Class: Osu::DB::ManiaScore
Overview
Score of osu!mania Mode
Instance Attribute Summary
Attributes inherited from Score
#beatmapcode, #combo, #datetime, #dummy, #game_mode, #geki, #katsu, #miss, #mods, #perfect, #score, #scorecode, #scoreid, #user, #x100, #x300, #x50
Instance Method Summary collapse
Methods inherited from Score
Constructor Details
This class inherits a constructor from Osu::DB::Score
Instance Method Details
#accuracy ⇒ Object
157 158 159 |
# File 'lib/osu-db/score.rb', line 157 def accuracy (300 * (max + x300) + 200 * x200 + 100 * x100 + 50 * x50) / (300.0 * hits) end |
#grade ⇒ Object
161 162 163 164 165 166 167 |
# File 'lib/osu-db/score.rb', line 161 def grade acc = accuracy [0.70, :D, 0.80, :C, 0.90, :B, 0.95, :A].each_slice(2) do |a, g| return g if acc <= a end acc < 1 ? :S : :SS end |
#hits ⇒ Object
153 154 155 |
# File 'lib/osu-db/score.rb', line 153 def hits max + x300 + x200 + x100 + x50 + miss end |