def drawboard(board) this function prints out the board that it was passed returns none hline ++ print( ' print(hline for in range( ) print('% |( + )end='' for in range( ) print(board[ ][ ]end='' print('|' print(hlinesummary the ai may seem almost unbeatablebut this isn' because the computer is smart the strategy it follows is simplemove on the corner if you canotherwise make the move that will flip over the most tiles we could do thatbut it would be slow to figure out how many tiles would be flipped for every possible valid move we could make but calculating this for the computer is simple the computer isn' smarter than usit' just much fasterthis game is similar to sonar because it makes use of grid for board it is also like the tic tac toe game because there' an ai that plans out the best move for it to take this only introduced one new conceptthat empty listsblank stringsand the integer all evaluate to false in the context of condition other than thatthis game used programming concepts you already knewyou don' have to know much about programming to create interesting games howeverthis game is stretching how far you can get with ascii art the board took up almost the entire screen to drawand the game didn' have any color later in this bookwe will learn how to create games with graphics and animationnot just text we will do this using module called pygamewhich adds new functions and features to python so that we can break away from using only text and keyboard input