public PlayBoardViewModel(PlayBoardViewModel other) : base(other) { _unrevealedCard1 = other.HasUnrevealedCard1 ? new CardViewModel(other.UnrevealedCard1) : new CardViewModel(); _unrevealedCard2 = other.HasUnrevealedCard2 ? new CardViewModel(other.UnrevealedCard2) : new CardViewModel(); _dimensions = other.HasDimensions ? new BoardDimensionsViewModel(other.Dimensions) : new BoardDimensionsViewModel(); _inGameCardsSynced = new SyncedViewModelList <Card, CardViewModel>(new List <Card>(other.InGameCards.Models()), m => new CardViewModel(m)); Init(); }
public PlayBoardViewModel(PlayBoard model) : base(model) { _unrevealedCard1 = model.HasUnrevealedCard1 ? new CardViewModel(model.UnrevealedCard1) : new CardViewModel(); _unrevealedCard2 = model.HasUnrevealedCard2 ? new CardViewModel(model.UnrevealedCard2) : new CardViewModel(); _dimensions = model.HasDimensions ? new BoardDimensionsViewModel(model.Dimensions) : new BoardDimensionsViewModel(); _inGameCardsSynced = new SyncedViewModelList <Card, CardViewModel>(model.InGameCards, m => new CardViewModel(m)); Init(); }
public PlayBoardViewModel() : base(new PlayBoard()) { _unrevealedCard1 = new CardViewModel(); _unrevealedCard2 = new CardViewModel(); _dimensions = new BoardDimensionsViewModel(); _inGameCardsSynced = new SyncedViewModelList <Card, CardViewModel>(new List <Card>(), m => new CardViewModel(m)); Init(); }
public GameControllerViewModel(GameController model) : base(model) { _playerHandler = new PlayerHandlerViewModel(model.PlayerHandler); _board = new PlayBoardViewModel(model.Board); _decks = new SyncedViewModelList <DeckDescription, DeckDescriptionViewModel>(model.Decks, m => new DeckDescriptionViewModel(m)); _deck = (from deck in Decks where deck.Equals(model.Deck) select deck).FirstOrDefault(); Init(); }
public GameControllerViewModel() : base(new GameController()) { _playerHandler = new PlayerHandlerViewModel(); _board = new PlayBoardViewModel(); _decks = new SyncedViewModelList <DeckDescription, DeckDescriptionViewModel>(new List <DeckDescription>(), model => new DeckDescriptionViewModel(model)); _deck = new DeckDescriptionViewModel(); Init(); }
public CardRackViewModel(CardRackViewModel other) : base(other) { _discardedCardsSynced = new SyncedViewModelList <CardSet, CardSetViewModel>(new List <CardSet>(other.DiscardedCards.Models()), model => new CardSetViewModel(model)); }
public CardRackViewModel(CardRack model) : base(model) { _discardedCardsSynced = new SyncedViewModelList <CardSet, CardSetViewModel>(model.DiscardedCards, m => new CardSetViewModel(m)); }
public CardRackViewModel() : base(new CardRack(new Player(String.Empty))) { _discardedCardsSynced = new SyncedViewModelList <CardSet, CardSetViewModel>(new List <CardSet>(), model => new CardSetViewModel(model)); }
public PlayerHandlerViewModel(PlayerHandlerViewModel other) : base(other) { _allPlayersSynced = new SyncedViewModelList <Player, PlayerViewModel>(new List <Player>(other.AllPlayers.Models()), m => new PlayerViewModel(m)); Init(); }
public PlayerHandlerViewModel(PlayerHandler model) : base(model) { _allPlayersSynced = new SyncedViewModelList <Player, PlayerViewModel>(model.AllPlayers, m => new PlayerViewModel(m)); Init(); }
public PlayerHandlerViewModel() : base(new PlayerHandler()) { _allPlayersSynced = new SyncedViewModelList <Player, PlayerViewModel>(new List <Player>(), m => new PlayerViewModel(m)); Init(); }