public static void Gamesize() { Console.CursorVisible = false; Console.SetWindowSize(130, 30); snake = new Snake(); Wall = new wall(); food = new Food(); }
public static bool GameOver(wall wall) { for (int i = 1; i < snake.body.Count; i++) { if (snake.body[0].x == snake.body[i].x && snake.body[0].y == snake.body[i].y) { return(true); } } for (int i = 0; i < Wall.body.Count; i++) { if (snake.body[0].x == Wall.body[i].x && snake.body[0].y == Wall.body[i].y) { return(true); } } return(false); }
public Save() { snake = Game.snake; Wall = Game.Wall; food = Game.food; }