Skip to content

rohitdalal0/tic-tac-toe-game-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

Tic tac toe with AI-bot and multithread


Game options-

  • 2-player
  • Play with AI of computer

Game tree:-

game tree

Wining logic:-

check1 = self.btn1['text'] == self.btn2['text'] == self.btn3['text'] != ''
check2 = self.btn4['text'] == self.btn5['text'] == self.btn6['text'] != ''
check3 = self.btn7['text'] == self.btn8['text'] == self.btn9['text'] != ''

check4 = self.btn1['text'] == self.btn4['text'] == self.btn7['text'] != ''
check5 = self.btn2['text'] == self.btn5['text'] == self.btn8['text'] != ''
check6 = self.btn3['text'] == self.btn6['text'] == self.btn9['text'] != ''

check7 = self.btn1['text'] == self.btn5['text'] == self.btn9['text'] != ''
check8 = self.btn3['text'] == self.btn5['text'] == self.btn7['text'] != ''

To get to know more check out my code.