Exemplo n.º 1
0
        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;
            }
        }