diff --git a/projects/flixel-desktop-habit-puzzle-game/source/HabitState.kiss b/projects/flixel-desktop-habit-puzzle-game/source/HabitState.kiss index ee4e0a44..63468f21 100644 --- a/projects/flixel-desktop-habit-puzzle-game/source/HabitState.kiss +++ b/projects/flixel-desktop-habit-puzzle-game/source/HabitState.kiss @@ -606,6 +606,10 @@ (+= y b.height)))) (function pointsStr [points] - (let [tallyUnit 5] - (+ (* "*" (Math.floor (/ points tallyUnit))) - (* "+" (% points tallyUnit))))) \ No newline at end of file + (let [&mut str "" tallyUnit 5 symbols ["+" "*" "\$"]] + (doFor i (reverse (collect (range symbols.length))) + (let [scaledTallyUnit (^ tallyUnit i) + tallies (Math.floor (/ points scaledTallyUnit))] + (+= str (* (nth symbols i) tallies)) + (-= points (* tallies scaledTallyUnit)))) + str)) \ No newline at end of file