Exemplo n.º 1
0
 public virtual void Add(IChar playerChar, IPosition position, bool removeLast = true)
 {
     playerChar.Position.Color = SnakeGenerator.GetBodyColor(playerChar.Color);
     playerChar.Path.Add(new PositionModel
     {
         Coordinate = new CoordinateModel
         {
             X = position.Coordinate.X,
             Y = position.Coordinate.Y
         },
         Color = playerChar.Color
     });
     if (removeLast)
     {
         playerChar.Path.RemoveAt(0);
     }
 }