From 2303968dc24664d1fb4383d019420e7ddcf06b8a Mon Sep 17 00:00:00 2001 From: nil Date: Wed, 18 Dec 2024 17:53:17 +0100 Subject: progress --- src/constants.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/constants.js') 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" -- cgit v1.2.3