public ConfigureBoardViewModel() { LockInLayoutCommand = new Command(LockInLayoutAsync, () => ConfiguringBoard.Cells.SelectMany(c => c).Count(c => c.Ship != null) == BoardStateViewModel.AmountOfCellsWithShips); ConfiguringBoard = new BoardStateViewModel(new BoardState(), true, true); }
public static BoardStateViewModel OtherPlayerBoard(this Game game) { var board = game.ThisPlayerIsGameCreator() ? game.RunningGameState.BoardParticipant : game.RunningGameState.BoardCreator; if (_otherPlayerBoardStateViewModel == null) { _otherPlayerBoardStateViewModel = new BoardStateViewModel(board, false, true); } else { _otherPlayerBoardStateViewModel.Model = board; } return(_otherPlayerBoardStateViewModel); }
public void SetUp() { _board = new BoardState(); _validate = new BoardStateViewModel(_board, true, true); }
public static void ResetBoards() { _thisPlayerBoardStateViewModel = null; _otherPlayerBoardStateViewModel = null; }