tic-tac-toe from GISC book keyboard exercise