public static GameSetupModel From(GameSetup setup)
 {
     var byType = setup.GetRandomizersByType();
     Func<CardType, CardInfo[]> getInfoByType = type => byType[type].Select(x => x.GetInfo()).ToArray();
     var model = new GameSetupModel
         {
             ThunderstoneBearer = getInfoByType(CardType.ThunderstoneBearer)[0],
             Monsters = getInfoByType(CardType.Monster),
             Heroes = getInfoByType(CardType.Hero),
             Weapons = getInfoByType(CardType.Weapon),
             Items = getInfoByType(CardType.Item),
             Spells = getInfoByType(CardType.Spell),
             Villagers = getInfoByType(CardType.Villager)
         };
     return model;
 }
Exemple #2
0
 void IPlayerView.GameSetup(GameSetupModel model)
 {
     Clients.Caller.displayGameSetup(model);
 }