Class: ColorTheCircles::Model::Game
- Inherits:
-
Object
- Object
- ColorTheCircles::Model::Game
- Defined in:
- app/color_the_circles/model/game.rb
Instance Attribute Summary collapse
-
#score ⇒ Object
Returns the value of attribute score.
Instance Method Summary collapse
-
#initialize ⇒ Game
constructor
A new instance of Game.
- #restart_game ⇒ Object
Constructor Details
#initialize ⇒ Game
Returns a new instance of Game.
6 7 8 |
# File 'app/color_the_circles/model/game.rb', line 6 def initialize @score = 0 end |
Instance Attribute Details
#score ⇒ Object
Returns the value of attribute score.
4 5 6 |
# File 'app/color_the_circles/model/game.rb', line 4 def score @score end |
Instance Method Details
#restart_game ⇒ Object
10 11 12 |
# File 'app/color_the_circles/model/game.rb', line 10 def restart_game @score = 0 # update variable directly to avoid notifying observers end |