Skip to main content

Highscore

Kindclass
Packagebackend
Full namebackend.Highscore
Sourcesource/backend/Highscore.hx

Public fields​

NameTypeStaticDefaultNotes
weekScoresMap<String, Int>yesnew Map()—
songScoresMap<String, Int>yesnew Map()—
songRatingMap<String, Float>yesnew Map()—

Public methods​

resetSong​

static function resetSong(song:String, diff:Int = 0):Void
ParameterTypeDefault
songString—
diff (optional)Int0

View source

resetWeek​

static function resetWeek(week:String, diff:Int = 0):Void
ParameterTypeDefault
weekString—
diff (optional)Int0

View source

floorDecimal​

static function floorDecimal(value:Float, decimals:Int):Float
ParameterTypeDefault
valueFloat—
decimalsInt—

View source

saveScore​

static function saveScore(song:String, score:Int = 0, diff:Int = 0, rating:Float = -1):Void
ParameterTypeDefault
songString—
score (optional)Int0
diff (optional)Int0
rating (optional)Float-1

View source

saveWeekScore​

static function saveWeekScore(week:String, score:Int = 0, diff:Int = 0):Void
ParameterTypeDefault
weekString—
score (optional)Int0
diff (optional)Int0

View source

formatSong​

static function formatSong(song:String, diff:Int):String
ParameterTypeDefault
songString—
diffInt—

View source

getScore​

static function getScore(song:String, diff:Int):Int
ParameterTypeDefault
songString—
diffInt—

View source

getRating​

static function getRating(song:String, diff:Int):Float
ParameterTypeDefault
songString—
diffInt—

View source

getWeekScore​

static function getWeekScore(week:String, diff:Int):Int
ParameterTypeDefault
weekString—
diffInt—

View source

load​

static function load():Void

View source

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