예제 #1
0
 public void UpdatePlayerDeckValues()
 {
     for (int i = 0; i < 4; i++)
     {
         Player    thisPlayer  = GetPlayerSeatedAt(i);
         Deck      playersDeck = thisPlayer.GetPlayersDeck();
         DeckValue bestValue   = DeckHelper.CalculateDeckValues(playersDeck)[3];
         playersDeck.SetDeckValue(bestValue.value);
         playersDeck.SetTrumpToChoose(bestValue.trumpType);
     }
 }
예제 #2
0
        public static Deck fromDynamic(dynamic json)
        {
            Deck deck = new Deck();

            deck.decks = new List <DeckValue>();
            foreach (var data in json)
            {
                deck.decks.Add(DeckValue.fromDynamic(data));
            }

            return(deck);
        }