I made the PlayerBot.makeMove method run on a separate thread but this introduced another problem: The player can make a move while the minimax is still running. I tried adding this code to my gameboardButtonClicked method but it didn't fix the problem. The string "Not Your Turn" just appears on random buttons for reasons I don't understand and it makes the players move when it's supposed to be returning out of the method before it calls makeMove.
There are many versions of my program in this thread; some are the whole source code and others are the specific areas of the code I've been working on. Right now the goal is to make the bot not unsmart and prevent the user from making a move while the bot is diving into a massive recursion tree.
# In single player mode, detect attempts by the player to make a move during the # bots turn and yell at them. This code needs to be fixed. if self.robot and not self.firstPlayersMove: self.gameboard[row][col].SetLabel("Not Your\nTurn!") wx.MilliSleep(1000) self.gameboard[row][col].SetLabel("") return
(Apr-27-2019, 02:15 AM)SheeppOSU Wrote: I was wondering if you could post all yuor code so it can be tested. you can post it in github or you can post it here - probably easier to post it on github - either way getting all the code is really helpful in assisting you
There are many versions of my program in this thread; some are the whole source code and others are the specific areas of the code I've been working on. Right now the goal is to make the bot not unsmart and prevent the user from making a move while the bot is diving into a massive recursion tree.