aboutsummaryrefslogtreecommitdiff
path: root/views/script/core_stats.js
diff options
context:
space:
mode:
authorMinteck <46352972+Minteck@users.noreply.github.com>2021-07-14 01:12:14 +0200
committerMinteck <46352972+Minteck@users.noreply.github.com>2021-07-14 01:12:14 +0200
commit0f0e3de9353c06dfaabc00682b4c2fd9c5f48924 (patch)
treeaef2474d205aea7865f7c9a4f17ffee474bbe7bc /views/script/core_stats.js
parentc3b756f987ffd8ca981c1e6f23435c74aad36aea (diff)
downloadkartik-client-0f0e3de9353c06dfaabc00682b4c2fd9c5f48924.tar.gz
kartik-client-0f0e3de9353c06dfaabc00682b4c2fd9c5f48924.tar.bz2
kartik-client-0f0e3de9353c06dfaabc00682b4c2fd9c5f48924.zip
Kartik Fox Nest!
Diffstat (limited to 'views/script/core_stats.js')
-rw-r--r--views/script/core_stats.js26
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;