about summary refs log tree commit diff
path: root/assets/src/stores/constant_state.ts
diff options
context:
space:
mode:
Diffstat (limited to 'assets/src/stores/constant_state.ts')
-rw-r--r--assets/src/stores/constant_state.ts33
1 files changed, 0 insertions, 33 deletions
diff --git a/assets/src/stores/constant_state.ts b/assets/src/stores/constant_state.ts
deleted file mode 100644
index aeda86e..0000000
--- a/assets/src/stores/constant_state.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-// Cannot be changed after being set.
-
-import { RookType } from "../models/rook_type";
-
-let clientType: RookType = null;
-
-export function setClientType(type: RookType) {
-    if (clientType !== null) {
-        clientType = type;
-    } else {
-        throw new Error("Tried changing client type after initialization.");
-    }
-}
-
-export function isClientShare() {
-    if (clientType === null) {
-        throw new Error(
-            "Tried accessing client type before initialization was completed."
-        );
-    }
-
-    return clientType === RookType.SHARE;
-}
-
-export function isClientRequest() {
-    if (clientType === null) {
-        throw new Error(
-            "Tried accessing client type before initialization was completed."
-        );
-    }
-
-    return clientType === RookType.REQUEST;
-}