public Game() { speed = 500; IsAlive = true; snake = new Snake(10, 10, '*', ConsoleColor.Blue); food = new Food(0, 0, '0', ConsoleColor.Red); wall = new Wall('#', ConsoleColor.Yellow); wall.LoadLevel(); food.Generate(snake, wall); g_objects = new List <GameObject>(); g_objects.Add(snake); g_objects.Add(food); g_objects.Add(wall); Console.CursorVisible = false; }
public Game() { isAlive = true; gameLevel = GameLevel.First; worm = new Worm(new Point { X = 10, Y = 10 }, ConsoleColor.White, '*'); food = new Food(new Point { X = 20, Y = 10 }, ConsoleColor.White, '+'); wall = new Wall(null, ConsoleColor.White, '#'); wall.LoadLevel(GameLevel.First); g_objects.Add(worm); g_objects.Add(food); g_objects.Add(wall); }
public void Lvl2() { Console.Clear(); //gameLevel = 2; wall.LoadLevel(2); }