Example #1
0
        private void Turn(String direction)
        {
            switch (direction)
            {
            case "left":
                _model.TurnLeft();
                break;

            case "right":
                _model.TurnRight();
                break;
            }
        }
Example #2
0
        private void AsteroidsForm_KeyDown(object sender, KeyEventArgs e)
        {
            switch (e.KeyCode)
            {
            case Keys.A:
                _model.TurnLeft();
                break;

            case Keys.D:
                _model.TurnRight();
                break;
            }
        }
Example #3
0
 public void TurnRight()
 {
     Assert.AreEqual(model.Player.X, 1);
     model.TurnRight();
     Assert.AreEqual(model.Player.X, 2);
 }