From c3f5e909d6ce9ac517590abd0f89a7eadb65f12d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoffer=20M=C3=BCller=20Madsen?= Date: Fri, 11 May 2018 21:47:48 +0200 Subject: [PATCH] flip is back --- board.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/board.py b/board.py index 0306a22..38693c3 100644 --- a/board.py +++ b/board.py @@ -256,3 +256,8 @@ class Board: def do_move(board, player, move): # Implies that move is valid; make sure to check move validity before calling do_move(...) return quack.do_move(board, player, move) + + + @staticmethod + def flip(board): + return tuple((-x for x in reversed(board)))