Class: Game

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, turns, history, win, level) ⇒ Game



5
6
7
# File 'lib/game_codebreaker/game.rb', line 5

def initialize( code, turns, history, win, level )
  @code, @turns, @history, @win, @level = code, turns, history, win, level 
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



3
4
5
# File 'lib/game_codebreaker/game.rb', line 3

def code
  @code
end

#historyObject (readonly)

Returns the value of attribute history.



3
4
5
# File 'lib/game_codebreaker/game.rb', line 3

def history
  @history
end

#levelObject (readonly)

Returns the value of attribute level.



3
4
5
# File 'lib/game_codebreaker/game.rb', line 3

def level
  @level
end

#turnsObject (readonly)

Returns the value of attribute turns.



3
4
5
# File 'lib/game_codebreaker/game.rb', line 3

def turns
  @turns
end

#winObject (readonly)

Returns the value of attribute win.



3
4
5
# File 'lib/game_codebreaker/game.rb', line 3

def win
  @win
end