Esempio n. 1
0
 private void AddOneRectOfBody()
 {
     SnakeObj.SnakeBody.Add(new SnakeBodyPart()
     {
         BasicRectangle = RectangleGenerator.Generate(RectangleTypes.SnakeBody),
         Index          = ++SnakeObj.MaxIndex,
         Location       = GetLocationForNewPart(SnakeObj.Direction)
     });
 }
Esempio n. 2
0
 public void AddOneRectOfBody(SnakeDirection snakeDirection)
 {
     SnakeBodyParts.Add(new SnakeBodyPart()
     {
         BasicRectangle = RectangleGenerator.Generate(RectangleTypes.SnakeBody),
         Index          = ++MaxIndex,
         Location       = GetLocationForNewPart(snakeDirection)
     });
 }
Esempio n. 3
0
        public static SnakeBodyPart GetDefaultBodyPart()
        {
            var bodyPart = new SnakeBodyPart()
            {
                BasicRectangle = RectangleGenerator.Generate(RectangleTypes.SnakeBody),
                Index          = 0,
                Location       = new PositionOnBoard(200, 200)
            };

            return(bodyPart);
        }