private void Turn(String direction) { switch (direction) { case "left": _model.TurnLeft(); break; case "right": _model.TurnRight(); break; } }
private void AsteroidsForm_KeyDown(object sender, KeyEventArgs e) { switch (e.KeyCode) { case Keys.A: _model.TurnLeft(); break; case Keys.D: _model.TurnRight(); break; } }
public void TurnLeft() { Assert.AreEqual(model.Player.X, 1); model.TurnLeft(); Assert.AreEqual(model.Player.X, 0); }