예제 #1
0
 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();
 }
예제 #2
0
 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();
 }
예제 #3
0
 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();
 }
예제 #4
0
 public BoardDimensionsViewModel(BoardDimensionsViewModel other)
     : base(other)
 {
 }