private void TurnRight(Ant ant) { switch (ant.Direction) { case Direction.E: ant.Direction = Direction.S; break; case Direction.W: ant.Direction = Direction.N; break; case Direction.N: ant.Direction = Direction.E; break; case Direction.S: ant.Direction = Direction.E; break; } }
public AntMoveForwardCommand(Ant ant) { this._ant = ant; }
public AntLeftRotateCommand(Ant ant) { this._ant = ant; }
public AntRightRotateCommand(Ant ant) { this._ant = ant; }