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); } }
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); }