From: Alexandre Terrasa Date: Wed, 25 Feb 2015 21:31:43 +0000 (+0100) Subject: contrib/nitrpg: use stats to store player nitcoins X-Git-Tag: v0.7.4~5^2 X-Git-Url: http://nitlanguage.org contrib/nitrpg: use stats to store player nitcoins So podium and stats can be displayed by time periods. Signed-off-by: Alexandre Terrasa --- diff --git a/contrib/nitrpg/src/statistics.nit b/contrib/nitrpg/src/statistics.nit index 580023a..e8afccc 100644 --- a/contrib/nitrpg/src/statistics.nit +++ b/contrib/nitrpg/src/statistics.nit @@ -57,6 +57,9 @@ redef class Player stats.save_in(self.key) end + redef fun nitcoins do return stats["nitcoins"] + redef fun nitcoins=(nc) do stats["nitcoins"] = nc + redef fun pretty do var res = new FlatBuffer res.append super