class SpaceInvaders::ButtonController
Public Instance Methods
Private Instance Methods
escape()
click to toggle source
# File lib/space_invaders/statics/button_controller.rb, line 17 def escape app.close end
space()
click to toggle source
# File lib/space_invaders/statics/button_controller.rb, line 21 def space if game_status.hasnt_started? game_status.start! elsif game_status.being_played? app.ship.fire! elsif game_status.finished? app.initialize_dynamics_and_trackers game_status.start! end end