예제 #1
0
 private void GameLogic()
 {
     while (!gameStop)
     {
         if (player.CheckTwoAces())
         {
             player.IsPassed = true;
         }
         if (aiPlayer.CheckTwoAces())
         {
             aiPlayer.IsPassed = true;
         }
         if (playerFirst)
         {
             PlayerMakeDecision();
             AIMakeDecision();
         }
         else
         {
             AIMakeDecision();
             PlayerMakeDecision();
         }
         if (player.IsPassed && aiPlayer.IsPassed)
         {
             BothPassed();
         }
         else if (aiPlayer.Points > 21 || player.Points > 21)
         {
             SomeoneBust();
         }
         else if (aiPlayer.Points == 21 || player.Points == 21)
         {
             SomeoneHasBlackjack();
         }
         else
         {
             Console.WriteLine("");
             Console.WriteLine("                  New Round");
             Console.WriteLine("");
         }
     }
 }