module ScoreF(scoreF) where import Fudgets scoreF = placerF autoP (currentF>*=^^==< loopThroughRightF (toBothF >=^^< maxSP >=^< stripEither) storageF where storageF = appStorageF "SpaceInvaders.highscore" 0 currentF = dispF "Score:" sumSP = accSP (\s->maybe 0 (s+)) 0 maxSP = accSP max 0 accSP f = mapstateSP (\s x->let s'=f s x in (s',[s'|s'/=s])) dispF lbl = lbl `labLeftOfF` intDispF' custom where custom = setFgColor "white" . setBgColor "black" . setInitSize 999999