Beispiel #1
0
 /// <summary>
 ///     Moves the snake to the given position. (If position is allowed or
 ///     forceMove true)
 ///     If the movement fails the game is lost.
 /// </summary>
 public void MoveTo(Vector2 position, bool forceMove = false)
 {
     if (forceMove || _gameController.IsPositionAllowed(position))
     {
         _firstTail.MoveTo(position);
     }
     else
     {
         _gameController.LooseGame();
     }
 }