From 53c587d323ed7b05871d674b1d4c77dab3b4ffb8 Mon Sep 17 00:00:00 2001 From: Dominik Roth Date: Fri, 15 Apr 2022 17:15:55 +0200 Subject: [PATCH] Detect draw --- vacuumDecay.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vacuumDecay.py b/vacuumDecay.py index 87bb78a..86a4057 100644 --- a/vacuumDecay.py +++ b/vacuumDecay.py @@ -320,6 +320,8 @@ class Node(): return self.state.curPlayer def getWinner(self): + if len(self.childs)==0: + return -1 return self.state.checkWin() def _activateEdge(self):