public LocalGameState(LocalGame game, MainNavigationModel mainNavigation) { _game = game; _mainNavigation = mainNavigation; _depGameBoardRaw = new Dependent(UpdateGameBoardRaw); _depGameBoard = new Dependent(UpdateGameBoard); _depPreviewBoard = new Dependent(UpdatePreviewBoard); }
public LocalGameViewModel(LocalGame localGame, MainNavigationModel mainNavigation) { _gameState = new LocalGameState(localGame, mainNavigation); _mainNavigation = mainNavigation; }
// Results // Business constructor public LocalOutcome( LocalGame game ,LocalPlayer winner ,int resigned ) { InitializeResults(); _game = new PredecessorObj<LocalGame>(this, RoleGame, game); _winner = new PredecessorOpt<LocalPlayer>(this, RoleWinner, winner); _resigned = resigned; }
// Results // Business constructor public LocalPlayer( LocalGame game ,int index ) { InitializeResults(); _game = new PredecessorObj<LocalGame>(this, RoleGame, game); _index = index; }
public CorrespondenceFact CreateFact(FactMemento memento) { LocalGame newFact = new LocalGame(memento); // Create a memory stream from the memento data. using (MemoryStream data = new MemoryStream(memento.Data)) { using (BinaryReader output = new BinaryReader(data)) { newFact._unique = (Guid)_fieldSerializerByType[typeof(Guid)].ReadData(output); } } return newFact; }