diff options
author | lonkaars <l.leblansch@gmail.com> | 2021-02-20 09:58:18 +0100 |
---|---|---|
committer | lonkaars <l.leblansch@gmail.com> | 2021-02-20 09:58:18 +0100 |
commit | 16044fbf61b06f4d53e2ffcab67569721b3792e2 (patch) | |
tree | 0085590ffa4810379ed01c381913bfcd34701dea /api/game/voerbak_connector.py | |
parent | de1b590edfe0ed5bced55bcb946f2417539bb97f (diff) |
game outcome done
Diffstat (limited to 'api/game/voerbak_connector.py')
-rw-r--r-- | api/game/voerbak_connector.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/api/game/voerbak_connector.py b/api/game/voerbak_connector.py index 9627f29..5ccaed8 100644 --- a/api/game/voerbak_connector.py +++ b/api/game/voerbak_connector.py @@ -20,6 +20,7 @@ class bord: self.height = h self.player_1 = True self.board = "0" * (w * h) + self.board_full = False self.win_positions = [] self.process = subprocess.Popen([VOERBAK_LOCATION], stdin=subprocess.PIPE, @@ -42,6 +43,8 @@ class bord: elif buffer.startswith("m:"): substr = buffer[2:] self.player_1 = True if substr == "true" else False + elif buffer.startswith("d:"): + self.board_full = True buffer = self.get_output() self.board = buffer |