Esempio n. 1
0
        private void PrepareNextRound()
        {
            var dirlist = new List <Direction>();

            cardShepherd.ResetCardsForNewRound((CurrentRound % 2 == 0) ? cardsToClearHigh : cardsToClearLow);
            roundTimer.ResetTimer();

            // Display correct instructions
            if (CurrentRound <= 2)
            {
                var rules = gameRules.AddRandomColorRules();
                instructionsGuiHandler.DisplayInstructions(rules);
                return;
            }

            if (CurrentRound >= 3)
            {
                dirlist = gameRules.AddRandomSuitRules();
            }

            if (CurrentRound >= 5)
            {
                pictureDir = gameRules.GetRandomDirection();
                dirlist.Add(pictureDir);
                gameRules.AddRule(pictureDir, 11, 13);
            }

            if (CurrentRound >= 7)
            {
                Direction lowCardsDir;
                do
                {
                    lowCardsDir = gameRules.GetRandomDirection();
                }while (lowCardsDir == pictureDir);

                dirlist.Add(lowCardsDir);
                gameRules.AddRule(lowCardsDir, 2, 5);
            }

            instructionsGuiHandler.DisplayInstructions(dirlist);
        }