added check for valid move on tictactoe baord (1-9)