Class: DsaCodebreakerGame::Game

Inherits:
Object
  • Object
show all
Defined in:
lib/dsa_codebreaker_game/game.rb

Instance Method Summary collapse

Constructor Details

#initializeGame

Returns a new instance of Game.



5
6
7
8
9
10
11
# File 'lib/dsa_codebreaker_game/game.rb', line 5

def initialize
  @code = Code.new
  @gamer = Gamer.new
  @console = Console.new
  @clues = 0
  @figured_out = ['_','_','_','_']
end

Instance Method Details

#startObject



13
14
15
16
# File 'lib/dsa_codebreaker_game/game.rb', line 13

def start
  @console.welcome(@gamer)
  looper
end