private void MoveCompleted(ComputerMoveData computerMoveData) { HexBoardViewModel hexBoard = this.currentViewModel.HexBoard; HexCellViewModel cellToPlay = hexBoard.GetCellAtLocation(computerMoveData.Move); if (cellToPlay != null) { cellToPlay.PlayCell(); this.canExecute = !computerMoveData.IsGameWon; } hexBoard.GetDebugDataCommand.Execute(hexBoard); }
public void Populate() { for (int x = 0; x < this.BoardSize; x++) { for (int y = 0; y < this.BoardSize; y++) { HexCellViewModel hexCell = new HexCellViewModel(this) { BoardX = x, BoardY = y }; this.Cells.Add(hexCell); } } }