aboutsummaryrefslogtreecommitdiff
path: root/api/game/voerbak_connector.py
diff options
context:
space:
mode:
authorlonkaars <l.leblansch@gmail.com>2021-02-19 20:32:24 +0100
committerlonkaars <l.leblansch@gmail.com>2021-02-19 20:32:24 +0100
commit0ddd056990d33f335cefc7f0a633e837ce7e116a (patch)
treeb15df5c9ce1d2eb251a0e21cf701ee08cb5a4c2c /api/game/voerbak_connector.py
parent1787205f04c9008a753618839bc8da72708f5cab (diff)
working connect 4 game on website
Diffstat (limited to 'api/game/voerbak_connector.py')
-rw-r--r--api/game/voerbak_connector.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/api/game/voerbak_connector.py b/api/game/voerbak_connector.py
index 6274ada..9627f29 100644
--- a/api/game/voerbak_connector.py
+++ b/api/game/voerbak_connector.py
@@ -11,7 +11,7 @@ DISC_A = Fore.RED + DISC_SHAPE + Fore.RESET
DISC_B = Fore.BLUE + DISC_SHAPE + Fore.RESET
EMPTY = Fore.LIGHTBLACK_EX + "_" + Fore.RESET
-VOERBAK_LOCATION = "./voerbak"
+VOERBAK_LOCATION = os.path.dirname(__file__) + "/voerbak"
if os.name == "nt": VOERBAK_LOCATION += ".exe"
class bord:
@@ -21,7 +21,7 @@ class bord:
self.player_1 = True
self.board = "0" * (w * h)
self.win_positions = []
- self.process = subprocess.Popen(["./voerbak"],
+ self.process = subprocess.Popen([VOERBAK_LOCATION],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=None)