Added computer move highliting
This commit is contained in:
parent
98ccb35b2a
commit
7b7097f1d6
@ -7,6 +7,7 @@ CTicTacToeApp app;
|
||||
BOOL CTicTacToeApp::InitInstance()
|
||||
{
|
||||
CTicTacToeDlg* dlg = new CTicTacToeDlg();
|
||||
m_pMainWnd = dlg;
|
||||
|
||||
dlg->DoModal();
|
||||
|
||||
|
@ -52,6 +52,7 @@
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<UseOfMfc>Dynamic</UseOfMfc>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@ -136,7 +137,7 @@
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
|
@ -50,6 +50,9 @@ void CTicTacToeDlg::OnBnClickedSquare(UINT nID)
|
||||
UINT comp_id = findComputerMove();
|
||||
playerMove(comp_id);
|
||||
buttons[comp_id].SetWindowTextW(L"O");
|
||||
buttons[comp_id].SetFocus();
|
||||
buttons[btn_id].SetButtonStyle(BS_FLAT);
|
||||
buttons[comp_id].SetButtonStyle(BS_DEFPUSHBUTTON);
|
||||
|
||||
if (checkWin(SqState::O)) {
|
||||
ended = TRUE;
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
class CTicTacToeDlg : public CDialog, public TicTacToeGame {
|
||||
public:
|
||||
CTicTacToeDlg() : CDialog(IDD_TIC_TAC_TOE_DIALOG, NULL) {};
|
||||
CTicTacToeDlg() : CDialog(IDD_TIC_TAC_TOE_DIALOG) {};
|
||||
|
||||
private:
|
||||
void OnOK();
|
||||
|
Loading…
x
Reference in New Issue
Block a user