Class: Game
Overview
Copyright © 2011 Jesse Sielaff
Instance Method Summary collapse
-
#available_colors ⇒ Object
Returns an Array of the colors of the Cards available for selection.
-
#cities ⇒ Object
Returns an Array of all Cities in the Game.
-
#routes ⇒ Object
Returns an Array of all Routes in the Game.
-
#unclaimed_routes ⇒ Object
Returns an Array of all unclaimed Routes in the Game.
Methods inherited from Entity
Constructor Details
This class inherits a constructor from Entity
Instance Method Details
#available_colors ⇒ Object
Returns an Array of the colors of the Cards available for selection.
9 10 11 |
# File 'lib/ttr/entities/game.rb', line 9 def available_colors @obj.deck.available_colors end |
#cities ⇒ Object
Returns an Array of all Cities in the Game.
15 16 17 |
# File 'lib/ttr/entities/game.rb', line 15 def cities City.entities(@obj.city_objs) end |
#routes ⇒ Object
Returns an Array of all Routes in the Game.
21 22 23 |
# File 'lib/ttr/entities/game.rb', line 21 def routes Route.entities(@obj.route_objs) end |
#unclaimed_routes ⇒ Object
Returns an Array of all unclaimed Routes in the Game.
27 28 29 |
# File 'lib/ttr/entities/game.rb', line 27 def unclaimed_routes Route.entities(@obj.route_objs.reject {|obj| obj.player_obj }) end |