Exemple #1
0
 private static void CheckPlay(string received)
 {
     if (received.Equals("PLAY"))
     {
         PlayACard(_player);
     }
     else if (received.Equals("PLAY KO"))
     {
         if (_isAi)
         {
             _idxCardAi += 1;
         }
         else
         {
             Console.Write("You cannot play this card!\n");
         }
     }
     else if (received.Equals("PLAY OK"))
     {
         if (_idCardToPlay == -1)
         {
             return;
         }
         if (_isAi)
         {
             Console.Write(_idCardToPlay + "\n");
         }
         _player.PutCard(ModelDeck.GetDeck()[_idCardToPlay]);
         _idCardToPlay = -1;
     }
 }