Class: Game
- Inherits:
-
Object
- Object
- Game
- Defined in:
- lib/game_codebreaker/game.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#history ⇒ Object
readonly
Returns the value of attribute history.
-
#level ⇒ Object
readonly
Returns the value of attribute level.
-
#turns ⇒ Object
readonly
Returns the value of attribute turns.
-
#win ⇒ Object
readonly
Returns the value of attribute win.
Instance Method Summary collapse
-
#initialize(code, turns, history, win, level) ⇒ Game
constructor
A new instance of Game.
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
#code ⇒ Object (readonly)
Returns the value of attribute code.
3 4 5 |
# File 'lib/game_codebreaker/game.rb', line 3 def code @code end |
#history ⇒ Object (readonly)
Returns the value of attribute history.
3 4 5 |
# File 'lib/game_codebreaker/game.rb', line 3 def history @history end |
#level ⇒ Object (readonly)
Returns the value of attribute level.
3 4 5 |
# File 'lib/game_codebreaker/game.rb', line 3 def level @level end |
#turns ⇒ Object (readonly)
Returns the value of attribute turns.
3 4 5 |
# File 'lib/game_codebreaker/game.rb', line 3 def turns @turns end |
#win ⇒ Object (readonly)
Returns the value of attribute win.
3 4 5 |
# File 'lib/game_codebreaker/game.rb', line 3 def win @win end |