"""display the board on the screen "" bext fg('white' display the top edge of the board print(downright (leftright board_widthdownleft display each row for in range(board_height) bext fg('white' if = the first row begins with '> print('>'end='' elselater rows begin with white vertical line print(updownend='' display each tile in this row for in range(board_width) bext fg(colors_map[board[(xy)]] if displaymode =color_mode print(blockend='' elif displaymode =shape_mode print(shapes_map[board[(xy)]]end='' bext fg('white' print(updownrows end with white vertical line display the bottom edge of the board print(upright (leftright board_widthupleft def askforplayermove(displaymode) """let the player select color to paint the upper left tile "" while true bext fg('white' print('choose one of 'end='' if displaymode =color_mode bext fg('red' print('( )ed 'end='' bext fg('green' print('( )reen 'end='' bext fg('blue' print('( )lue 'end='' bext fg('yellow' print('( )ellow 'end='' bext fg('cyan' print('( )yan 'end='' bext fg('purple' print('( )urple 'end='' elif displaymode =shape_mode bext fg('red' print('( )eart'end='' bext fg('green' print('( )riangle'end='' bext fg('blue' print('( )iamond'end='' bext fg('yellow'flooder