public Engine() { Switch = true; mode = Mode.menu; menumode = MenuMode.main; lvl = GameLvl.first; obj = Obj.snake; menu = new Menu(null, ConsoleColor.Blue, '#'); menu.LoadRamp(); game = new Game(lvl); menu.DrawAll(); }
void MenuAction() { switch (menu.ind) { case 0: mode = Mode.play; lvl = GameLvl.first; game.lvl = lvl; game.CreateNewLvl(game.lvl); game.LoadColors(snakecolor, headcolor, wallcolor, foodcolor); game.CreateNewFood(); game.Draw(); break; case 1: mode = Mode.play; game = Game.Load(); game.LoadColors(snakecolor, headcolor, wallcolor, foodcolor); game.Draw(); game.StopSnake(); break; case 2: menu.ChangeOptions(); menumode = menu.menumode; menu.DrawAll(); break; case 3: break; case 4: Switch = false; EndProcess(); break; } }