refactored tic tac toe into classes