public void Execute(IRobotCommander commander) { IRobot robot = commander.GetCurrentRobot(); foreach (Movement m in m_moves) { switch (m) { case Movement.L: robot.TurnLeft(); break; case Movement.R: robot.TurnRight(); break; case Movement.M: robot.MoveForward(); break; } } }
public void Execute(IRobotCommander commander) { //do nothing }
public void Execute(IRobotCommander commander) { commander.Arena = new Arena(width, height); }
public void Execute(IRobotCommander commander) { commander.AddBattleRobot(new BattleRobot(m_x, m_y, m_direction)); }
public Maneuver(IRobotCommander commander) { this.commander = commander; }