by al sweigart al@inventwithpython com released under "simplified bsdlicense based on the "reversi pycode that originally appeared in "invent your own computer games with python" import randomsyspygametimecopy from pygame locals import fps frames per second to update the screen windowwidth width of the program' windowin pixels windowheight height in pixels spacesize width height of each space on the boardin pixels boardwidth how many columns of spaces on the game board boardheight how many rows of spaces on the game board white_tile 'white_tilean arbitrary but unique value black_tile 'black_tilean arbitrary but unique value empty_space 'empty_spacean arbitrary but unique value hint_tile 'hint_tilean arbitrary but unique value animationspeed integer from to higher is faster animation amount of space on the left right side (xmarginor above and below (ymarginthe game boardin pixels xmargin int((windowwidth (boardwidth spacesize) ymargin int((windowheight (boardheight spacesize) white ( black green brightblue brown ( textbgcolor brightblue textbgcolor green gridlinecolor black textcolor white hintcolor brown def main() global mainclockdisplaysurffontbigfontbgimage pygame init(