Exemplo n.º 1
0
 /**
  * The given robot turns in counterclockwise direction
  *
  * @param robot The robot that has to execute this command.
  * @effect The given robot turns in counterclockwise direction, provided it has the energy to do
  *     so.
  */
 @Override
 public void execute(Robot robot) {
   if (robot.getEnergy().compareTo(Robot.getEnergyToTurn()) != -1) robot.turnCounterclockwise();
 }