#include "RomSettings.hpp"
#include <algorithm>
namespace ale {
RomSettings::RomSettings() {}
bool RomSettings::isLegal(const Action& a) const {
return true;
}
ActionVect RomSettings::getMinimalActionSet() {
ActionVect actions;
for (int a = 0; a < PLAYER_B_NOOP; a++) {
if (isMinimal((Action)a) && isLegal((Action)a)) {
actions.push_back((Action)a);
}
}
return actions;
}
ActionVect RomSettings::getAllActions() {
ActionVect actions;
for (int a = 0; a < PLAYER_B_NOOP; a++) {
if (isLegal((Action)a)) {
actions.push_back((Action)a);
}
}
return actions;
}
ActionVect RomSettings::getStartingActions() {
return ActionVect();
}
ModeVect RomSettings::getAvailableModes() {
return ModeVect(1, 0);
}
void RomSettings::setMode(game_mode_t m, System&, std::unique_ptr<StellaEnvironmentWrapper>) {
if (m != 0) {
throw std::runtime_error("This mode is not currently available for this game");
}
}
DifficultyVect RomSettings::getAvailableDifficulties() {
return DifficultyVect(1, 0);
}
bool RomSettings::isModeSupported(game_mode_t m) {
auto modes = getAvailableModes();
return std::find(modes.begin(), modes.end(), m) != modes.end();
}
}