diff --git a/board.txt b/board.txt new file mode 100644 index 0000000..f746e70 --- /dev/null +++ b/board.txt @@ -0,0 +1,18 @@ + 123 456 789 + | | + ... | ... | ... a + ... | ... | ... b + ... | ... | ... c + | | + ---------------- + | | + ... | ... | ... d + ... | ... | ... e + ... | ... | ... f + | | + ---------------- + | | + ... | ... | ... g + ... | ... | ... h + ... | ... | ... i + | | diff --git a/board2.py b/board2.py index 302c839..62b252a 100644 --- a/board2.py +++ b/board2.py @@ -75,7 +75,8 @@ class Board: for k in range(3): for l in range(3): buf.append(TwoDPos(TwoDPos.l, (i, j, k, l))) - + return buf + def possible(self): try: move = self.moves[-1] @@ -90,7 +91,7 @@ class Board: return buf local = move.local() - if self.subWin(local[0], local[1]): + if self.subWin(local[2], local[3]): return self.reachableEmpty() buf = []