private void MoveCompleted(ComputerMoveData computerMoveData) { HexCellViewModel cellToPlay = this.currentViewModel.GetCellAtLocation(computerMoveData.Move); if (cellToPlay != null) { cellToPlay.PlayCell(); this.currentViewModel.SetLastMoveDuration(computerMoveData.Time); } }
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); }
private static void ShowBestMoveCompleted(ComputerMoveData bestMoveData, HexBoardViewModel boardViewModel, int moveSkillLevel) { HexCellViewModel bestMoveCell = boardViewModel.Cells.FirstOrDefault(cell => cell.Location == bestMoveData.Move); if (bestMoveCell != null) { HexCellDebugDataViewModel debugData = bestMoveCell.DebugData; if (bestMoveData.PlayerX) { debugData.IsMoveForPlayerX = Visibility.Visible; debugData.MoveForPlayerXText = AddSkillText(debugData.MoveForPlayerXText, moveSkillLevel); } else { debugData.IsMoveForPlayerY = Visibility.Visible; debugData.MoveForPlayerYText = AddSkillText(debugData.MoveForPlayerYText, moveSkillLevel); } } }