Class: ColorTheCircles::Model::Game

Inherits:
Object
  • Object
show all
Defined in:
app/color_the_circles/model/game.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeGame

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

#scoreObject

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_gameObject



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