Class: Valanga::Difficulty::Base
- Inherits:
-
Object
- Object
- Valanga::Difficulty::Base
show all
- Defined in:
- lib/valanga/difficulty/base.rb
Instance Method Summary
collapse
Instance Method Details
#achievement_rate ⇒ Object
24
25
26
27
28
29
30
|
# File 'lib/valanga/difficulty/base.rb', line 24
def achievement_rate
if groovin.achievement_rate >= collete.achievement_rate
groovin.achievement_rate
else
collete.achievement_rate
end
end
|
#artist ⇒ Object
8
9
10
|
# File 'lib/valanga/difficulty/base.rb', line 8
def artist
groovin.artist || collete.artist
end
|
#clear ⇒ Object
48
49
50
|
# File 'lib/valanga/difficulty/base.rb', line 48
def clear
groovin.clear || collete.clear
end
|
#cleared? ⇒ Boolean
56
57
58
|
# File 'lib/valanga/difficulty/base.rb', line 56
def cleared?
achievement_rate && 70.0 <= achievement_rate
end
|
#full_combo ⇒ Object
52
53
54
|
# File 'lib/valanga/difficulty/base.rb', line 52
def full_combo
groovin.full_combo || collete.full_combo
end
|
#full_combo? ⇒ Boolean
64
65
66
|
# File 'lib/valanga/difficulty/base.rb', line 64
def full_combo?
! full_combo.nil?
end
|
#miss_count ⇒ Object
32
33
34
35
36
37
38
39
40
41
42
|
# File 'lib/valanga/difficulty/base.rb', line 32
def miss_count
if [groovin.miss_count, collete.miss_count].all?
if groovin.miss_count >= collete.miss_count
collete.miss_count
else
groovin.miss_count
end
else
groovin.miss_count || collete.miss_count
end
end
|
#name ⇒ Object
4
5
6
|
# File 'lib/valanga/difficulty/base.rb', line 4
def name
groovin.name || collete.name
end
|
#play_count ⇒ Object
44
45
46
|
# File 'lib/valanga/difficulty/base.rb', line 44
def play_count
groovin.play_count + collete.play_count
end
|
#played? ⇒ Boolean
60
61
62
|
# File 'lib/valanga/difficulty/base.rb', line 60
def played?
play_count > 0
end
|
#rank ⇒ Object
12
13
14
|
# File 'lib/valanga/difficulty/base.rb', line 12
def rank
groovin.rank || collete.rank
end
|
#score ⇒ Object
16
17
18
19
20
21
22
|
# File 'lib/valanga/difficulty/base.rb', line 16
def score
if groovin.score >= collete.score
groovin.score
else
collete.score
end
end
|