refactoring tic_tac_toe.rb