refactor rules, minimax_ai, command_line_game