From 1eb46774c2f5da676b56a3fadfec7c9b55dff1d5 Mon Sep 17 00:00:00 2001 From: JialianLee Date: Sat, 23 Dec 2017 09:47:08 +0800 Subject: [PATCH] small modification --- AlphaGo/reversi.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/AlphaGo/reversi.py b/AlphaGo/reversi.py index cba91d9..320445e 100644 --- a/AlphaGo/reversi.py +++ b/AlphaGo/reversi.py @@ -171,12 +171,12 @@ class Reversi: if self.black_win is not None: return self.black_win else: - ValueError("Game not finished!") + raise ValueError("Game not finished!") def board2bitboard(self): count = 1 if self.board is None: - ValueError("None board!") + raise ValueError("None board!") self.black = 0 self.white = 0 for i in range(64): @@ -208,7 +208,7 @@ class Reversi: def step(self): if self.action < 0 or self.action > 63: - ValueError("Wrong action!") + raise ValueError("Wrong action!") if self.action is None: return False