Class: SpaceInvaders::GameStatus
- Inherits:
-
Base
- Object
- Base
- SpaceInvaders::GameStatus
show all
- Defined in:
- lib/space_invaders/statics/game_status.rb
Instance Attribute Summary collapse
Attributes inherited from Base
#app
Instance Method Summary
collapse
Methods inherited from Base
#game_status, #initialize
Instance Attribute Details
#drowned_ship ⇒ Object
Also known as:
drowned_ship?
Returns the value of attribute drowned_ship.
4
5
6
|
# File 'lib/space_invaders/statics/game_status.rb', line 4
def drowned_ship
@drowned_ship
end
|
#finished ⇒ Object
Also known as:
finished?
Returns the value of attribute finished.
4
5
6
|
# File 'lib/space_invaders/statics/game_status.rb', line 4
def finished
@finished
end
|
#next_level ⇒ Object
Also known as:
next_level?
Returns the value of attribute next_level.
4
5
6
|
# File 'lib/space_invaders/statics/game_status.rb', line 4
def next_level
@next_level
end
|
#started ⇒ Object
Also known as:
started?
Returns the value of attribute started.
4
5
6
|
# File 'lib/space_invaders/statics/game_status.rb', line 4
def started
@started
end
|
Instance Method Details
#being_played? ⇒ Boolean
19
20
21
|
# File 'lib/space_invaders/statics/game_status.rb', line 19
def being_played?
started? && !drowned_ship && !next_level? && !finished?
end
|
#continue! ⇒ Object
44
45
46
47
|
# File 'lib/space_invaders/statics/game_status.rb', line 44
def continue!
@drowned_ship = false
@next_level = false
end
|
#drowned_ship! ⇒ Object
40
41
42
|
# File 'lib/space_invaders/statics/game_status.rb', line 40
def drowned_ship!
@drowned_ship = true
end
|
#finished! ⇒ Object
36
37
38
|
# File 'lib/space_invaders/statics/game_status.rb', line 36
def finished!
@finished = true
end
|
#hasnt_started? ⇒ Boolean
23
24
25
|
# File 'lib/space_invaders/statics/game_status.rb', line 23
def hasnt_started?
not started?
end
|
#initialze(app) ⇒ Object
11
12
13
14
15
16
17
|
# 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! ⇒ Object
27
28
29
|
# File 'lib/space_invaders/statics/game_status.rb', line 27
def next_level!
@next_level = true
end
|
#start! ⇒ Object
31
32
33
34
|
# File 'lib/space_invaders/statics/game_status.rb', line 31
def start!
@started = true
@finished = false
end
|
#status ⇒ Object
49
50
|
# File 'lib/space_invaders/statics/game_status.rb', line 49
def status
end
|