Highscore
| Kind | class |
| Package | backend |
| Full name | backend.Highscore |
| Source | source/backend/Highscore.hx |
Public fields
| Name | Type | Static | Default | Notes |
|---|---|---|---|---|
weekScores | Map<String, Int> | yes | new Map() | — |
songScores | Map<String, Int> | yes | new Map() | — |
songRating | Map<String, Float> | yes | new Map() | — |
Public methods
resetSong
static function resetSong(song:String, diff:Int = 0):Void
| Parameter | Type | Default |
|---|---|---|
song | String | — |
diff (optional) | Int | 0 |
resetWeek
static function resetWeek(week:String, diff:Int = 0):Void
| Parameter | Type | Default |
|---|---|---|
week | String | — |
diff (optional) | Int | 0 |
floorDecimal
static function floorDecimal(value:Float, decimals:Int):Float
| Parameter | Type | Default |
|---|---|---|
value | Float | — |
decimals | Int | — |
saveScore
static function saveScore(song:String, score:Int = 0, diff:Int = 0, rating:Float = -1):Void
| Parameter | Type | Default |
|---|---|---|
song | String | — |
score (optional) | Int | 0 |
diff (optional) | Int | 0 |
rating (optional) | Float | -1 |
saveWeekScore
static function saveWeekScore(week:String, score:Int = 0, diff:Int = 0):Void
| Parameter | Type | Default |
|---|---|---|
week | String | — |
score (optional) | Int | 0 |
diff (optional) | Int | 0 |
formatSong
static function formatSong(song:String, diff:Int):String
| Parameter | Type | Default |
|---|---|---|
song | String | — |
diff | Int | — |
getScore
static function getScore(song:String, diff:Int):Int
| Parameter | Type | Default |
|---|---|---|
song | String | — |
diff | Int | — |
getRating
static function getRating(song:String, diff:Int):Float
| Parameter | Type | Default |
|---|---|---|
song | String | — |
diff | Int | — |
getWeekScore
static function getWeekScore(week:String, diff:Int):Int
| Parameter | Type | Default |
|---|---|---|
week | String | — |
diff | Int | — |
load
static function load():Void
Internals
Private / internal members
| Method |
|---|
static function setScore(song:String, score:Int):Void |
static function setWeekScore(week:String, score:Int):Void |
static function setRating(song:String, rating:Float):Void |