Exemplo n.º 1
0
        private static void SinglePlayerMode()
        {
            Map    map    = MapFiller();
            Player player = new Player();

            string[] Settings = { "Start", "Change Map", "Change AI's Difficulty", "Change Points Goal" };
            string   Question;
            int      CursorPos    = 0;
            int      AIDifficulty = 3;
            int      PointsGoal   = 0;

            while (true)
            {
                Question = $"Current map is:{map.Name}";
                switch (AIDifficulty)
                {
                case 1:
                    Question += "||AI Difficulty - Hard";
                    break;

                case 2:
                    Question += "||AI Difficulty - Medium";
                    break;

                case 3:
                    Question += "||AI Difficulty - Easy";
                    break;
                }
                switch (PointsGoal)
                {
                case 0:
                    Question += "|Pts:Infinite";
                    break;

                default:
                    Question += $"|Pts:{PointsGoal}";
                    break;
                }


                switch (Interface.AnswerInterface(Question, Settings, CursorPos))
                {
                case 0:
                    Game NewGame = new Game(map, player, PointsGoal);
                    NewGame.Start(AIDifficulty);
                    break;

                case 1:
                    CursorPos = 1;
                    if (map.Number == 6)
                    {
                        map = MapFiller(1);                      //Yes, you have to manually change number of maps, when ones are added...Sorry, I guess...
                    }
                    else
                    {
                        map = MapFiller(map.Number + 1);
                    }
                    break;

                case 2:
                    CursorPos = 2;
                    if (AIDifficulty == 1)
                    {
                        AIDifficulty = 3;
                    }
                    else
                    {
                        AIDifficulty--;
                    }
                    break;

                case 3:
                    CursorPos = 3;
                    if (PointsGoal == 1000)
                    {
                        PointsGoal = 0;
                    }
                    else
                    {
                        PointsGoal += 200;
                    }
                    break;
                }
            }
        }