Tic Tac Toe (refactoring needed)