コード例 #1
0
        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;
                }
            }
        }
コード例 #2
0
 public void Execute(IRobotCommander commander)
 {
     //do nothing
 }
コード例 #3
0
 public void Execute(IRobotCommander commander)
 {
     commander.Arena = new Arena(width, height);
 }
コード例 #4
0
 public void Execute(IRobotCommander commander)
 {
     commander.AddBattleRobot(new BattleRobot(m_x, m_y, m_direction));
 }
コード例 #5
0
ファイル: Maneuver.cs プロジェクト: martikaljuve/Robin
 public Maneuver(IRobotCommander commander)
 {
     this.commander = commander;
 }