From c226da49d5d8fd06d12dd443262a6b85e3285aba Mon Sep 17 00:00:00 2001 From: Joursoir Date: Sat, 20 Feb 2021 20:28:57 +0000 Subject: add alpha–beta pruning; fix bugs: uncorrect random move MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- clui.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'clui.cpp') diff --git a/clui.cpp b/clui.cpp index 5eff6b2..520a758 100644 --- a/clui.cpp +++ b/clui.cpp @@ -113,8 +113,10 @@ void startGame() delete game_field; game_field = new GameField(gb_y, gb_x, gb_lwin); drawGame(gb_y, gb_x); - if(play_with_ai && gb_symbol == SYMBOL_PLAYERTWO) + if(play_with_ai && gb_symbol == SYMBOL_PLAYERTWO) { + game_bot->FirstMove(true); aiMove(); + } } void changePlayer() -- cgit v1.2.3-18-g5258