refactoring the code of game_spec.rb. Duplications eliminated