com.github.thehilikus.jrobocom.player.InstructionSet Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jrobocom-core Show documentation
Show all versions of jrobocom-core Show documentation
The game core infrastructure
package com.github.thehilikus.jrobocom.player;
import com.github.thehilikus.jrobocom.robot.api.RobotAction;
/**
* The maximum group of operations supported by robots. Every set contains all the previous sets
*
*/
public enum InstructionSet {
/**
* The first level of instructions:
* {@link RobotAction#changeBank(int)}, {@link RobotAction#die(String)},
* {@link RobotAction#move()}, {@link RobotAction#turn(boolean)}
*/
BASIC, /**
* The first + second level of instructions:
* BASIC + {@link RobotAction#scan(int)}, {@link RobotAction#reverseTransfer(int, int)}
*/
ADVANCED, /**
* The complete set of instructions:
* BASIC + ADVANCED + {@link RobotAction#createRobot(String name, InstructionSet pSet, int banksCount, boolean pMobile)}
*/
SUPER;
/**
* @param other the Set to compare this with
* @return true if this is simpler than other
*/
public boolean isLessThan(InstructionSet other) {
return ordinal() < other.ordinal();
}
}