Пример #1
0
 public void AddSnakeBodyPart(SnakeBodyPartView snakeBodyPartView)
 {
     _snake.Add(snakeBodyPartView);
     if (_snake.Count > 4)
     {
         Swap(_snake.Count - 1, _snake.Count - 2);
     }
 }
Пример #2
0
 public void RemoveItem(SnakeBodyPartView view)
 {
     foreach (var partView in _snake)
     {
         if (partView == view)
         {
             _snake.Remove(view);
             return;
         }
     }
 }