Sha256: 994de0587f17b515a40c66cae3f2bdf8d2394c4da2a083b9b9cdabfede5a3c87
Contents?: true
Size: 395 Bytes
Versions: 2
Compression:
Stored size: 395 Bytes
Contents
module MM class GameResetter attr_accessor :game def reset_game(game) @game = game reset_board game.number_of_turns_taken = 0 game.won_flag = false game.secret_code = game.set_secret_code game.current_guess = [] game.current_result = [] end def reset_board game.board = game.generate_empty_board(game.config) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
games_bfox-0.3.0 | lib/games/mastermind/game_resetter.rb |
games_bfox-0.2.0 | lib/games/mastermind/game_resetter.rb |