class SpaceInvaders::GameStatus
Attributes
drowned_ship[RW]
drowned_ship?[RW]
finished[RW]
finished?[RW]
next_level[RW]
next_level?[RW]
started[RW]
started?[RW]
Public Instance Methods
being_played?()
click to toggle source
# File lib/space_invaders/statics/game_status.rb, line 19 def being_played? started? && !drowned_ship && !next_level? && !finished? end
continue!()
click to toggle source
# File lib/space_invaders/statics/game_status.rb, line 44 def continue! @drowned_ship = false @next_level = false end
drowned_ship!()
click to toggle source
# File lib/space_invaders/statics/game_status.rb, line 40 def drowned_ship! @drowned_ship = true end
finished!()
click to toggle source
# File lib/space_invaders/statics/game_status.rb, line 36 def finished! @finished = true end
hasnt_started?()
click to toggle source
# File lib/space_invaders/statics/game_status.rb, line 23 def hasnt_started? not started? end
initialze(app)
click to toggle source
Calls superclass method
# File lib/space_invaders/statics/game_status.rb, line 11 def initialze app super @started = false @finished = false @drowned_ship = false @next_level = false end
next_level!()
click to toggle source
# File lib/space_invaders/statics/game_status.rb, line 27 def next_level! @next_level = true end
start!()
click to toggle source
# File lib/space_invaders/statics/game_status.rb, line 31 def start! @started = true @finished = false end
status()
click to toggle source
# File lib/space_invaders/statics/game_status.rb, line 49 def status end