improving tictactoe.py