diff options
Diffstat (limited to 'views/script/core_stats.js')
-rw-r--r-- | views/script/core_stats.js | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/views/script/core_stats.js b/views/script/core_stats.js index a49851d..c8d26df 100644 --- a/views/script/core_stats.js +++ b/views/script/core_stats.js @@ -1,31 +1,5 @@ const fs = require('fs'); const homedir = require('@electron/remote').getCurrentWindow().homedir; -const defaultStats = { - times: { - single: 0, - local: 0, - online: 0 - }, - results: { - wins: 0, - loses: 0 - }, - ingame: { - walls: 0, - laps: 0, - turns: 0 - } -} - -if (!fs.existsSync(homedir + "/.kartik/stats.json")) { - fs.writeFileSync(homedir + "/.kartik/stats.json", JSON.stringify(defaultStats)); -} else { - try { - JSON.parse(fs.readFileSync(homedir + "/.kartik/stats.json").toString()); - } catch (e) { - fs.writeFileSync(homedir + "/.kartik/stats.json", JSON.stringify(defaultStats)); - } -} session = null; timer = null; |