summaryrefslogtreecommitdiff
path: root/src/constants.js
diff options
context:
space:
mode:
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"