예제 #1
0
        public void SaveNextSnakeChain()
        {
            SnakeChain lastChain = snake.Last();

            int[] lastCoords = lastChain.GetLastCoords();

            SnakeChain tempSnakeChain = new SnakeChain(graphics);

            tempSnakeChain.SetCoords(lastCoords);
            tempSnakeChain.SetVector(lastChain.GetLastVector());

            snake.AddLast(tempSnakeChain);
        }
예제 #2
0
 public Boolean IsAppleEaten(SnakeChain snakeChain, Apple apple)
 {
     return(snakeChain.GetCoords().SequenceEqual(apple.GetCoords()));
 }