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); }
public Boolean IsAppleEaten(SnakeChain snakeChain, Apple apple) { return(snakeChain.GetCoords().SequenceEqual(apple.GetCoords())); }