tic-tac-toe - simplified some code