Simplified tictactoe.py code