TicTacToe - refactoring