Beispiel #1
0
 private void HandleBelote(Player player, Card card)
 {
     if (player.HasBelote() && card.IsBeloteCard(_trump))
     {
         if (player.GetBeloteCards() == 2)
         {
             player.SetBeloteCards((short)(player.GetBeloteCards() - 1));
             Broadcast("MSG [" + player.GetName() + "] BELOTE!");
         }
         else if (player.GetBeloteCards() == 1)
         {
             player.SetBeloteCards((short)(player.GetBeloteCards() - 1));
             Broadcast("MSG [" + player.GetName() + "] RE-BELOTE!");
             _teams[player.GetId() % 2].AddScore(20);
             _teams[player.GetId() % 2].SetHasBelote(true);
         }
     }
 }
Beispiel #2
0
        private void CheckDeclarations(Player player)
        {
            var toAdd = 0;

            if (player.GetDeck().Size() != 8)
            {
                return;
            }
            player.CheckBelote(_trump);
            if ((toAdd += player.HasAllFour()) != 0)
            {
                Broadcast("MSG " + player.GetName() + " has an all-four!");
            }
            _teams[player.GetId() % 2].AddScore(toAdd);
            if (toAdd != 0)
            {
                Broadcast("MSG " + _teams[player.GetId() % 2].GetName() + " has now "
                          + _teams[player.GetId() % 2].GetScore() + " points.");
            }
        }