Ejemplo n.º 1
0
        private void GettingCardInteraction(ILogic Logic)
        {
            Logic.GetCardToPlayerSet();

            ShowPlayerTookInf(Logic.GetCardsOfPlayer().Last());
            WaitKey();

            if (!Logic.CheckValidSum(Logic.GetCardsOfPlayer()))
            {
                ShowComputerWin();
                WaitKey();
                Logic.ClearSets();
                ClearScreen();
                MenuState.Back();
                return;
            }
            if (!Logic.CheckValidSum(Logic.GetCardsOfComputer()))
            {
                ShowPlayerWin();
                WaitKey();
                Logic.ClearSets();
                ClearScreen();
                MenuState.Back();
                return;
            }

            if (Logic.ComputerTakingCard())
            {
                ShowComputerTookInf();
                WaitKey();
            }
            else
            {
                ShowComputerOpenInf(Logic);
                WaitKey();
                OpeningCardsInteraction(Logic);
            }

            ClearScreen();
            ShowSetOfCards(Logic.GetCardsOfPlayer());
        }
Ejemplo n.º 2
0
 protected override void ShowPlayerOpenInf(ILogic Logic)
 {
     Console.Write($"Player is opening the cards!\n");
     ShowSetOfCards(Logic.GetCardsOfPlayer());
     Console.WriteLine("Press Enter to continue.");
 }
Ejemplo n.º 3
0
 //-----------------------------------------------------------------------------Methods of UI Interaction with a Logic-----------------
 private void StartingRoundInteraction(ILogic Logic)
 {
     ClearScreen();
     ShowSetOfCards(Logic.GetCardsOfPlayer());
 }