summaryrefslogtreecommitdiff
path: root/src/constants.js
diff options
context:
space:
mode:
authornil <niljo@airmail.cc>2024-12-18 17:53:17 +0100
committernil <niljo@airmail.cc>2024-12-18 17:53:17 +0100
commit2303968dc24664d1fb4383d019420e7ddcf06b8a (patch)
treedfd0193a6cc1178c193ed1c6ccce0c427cf4f0fd /src/constants.js
parent7b005bc02b1e73c71f8cb8f4e03b6fe6ff420c67 (diff)
progressHEADmaster
Diffstat (limited to 'src/constants.js')
-rw-r--r--src/constants.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/constants.js b/src/constants.js
index bb70c8e..5364410 100644
--- a/src/constants.js
+++ b/src/constants.js
@@ -1,6 +1,9 @@
export const PLAYER = {
BLACK: "black",
WHITE: "white",
+ OPPOSITE: function(color) {
+ return color == PLAYER.BLACK ? PLAYER.WHITE : PLAYER.BLACK
+ },
}
export const ASSETS_BLACK = "assets/black.png"