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(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() : 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 BoardDimensionsViewModel(BoardDimensionsViewModel other) : base(other) { }