Merge branch 'master' of github.com:sproblvem/tianshou
This commit is contained in:
commit
d0e150f090
@ -177,12 +177,12 @@ class Reversi:
|
|||||||
if self.black_win is not None:
|
if self.black_win is not None:
|
||||||
return self.black_win
|
return self.black_win
|
||||||
else:
|
else:
|
||||||
ValueError("Game not finished!")
|
raise ValueError("Game not finished!")
|
||||||
|
|
||||||
def board2bitboard(self):
|
def board2bitboard(self):
|
||||||
count = 1
|
count = 1
|
||||||
if self.board is None:
|
if self.board is None:
|
||||||
ValueError("None board!")
|
raise ValueError("None board!")
|
||||||
self.black = 0
|
self.black = 0
|
||||||
self.white = 0
|
self.white = 0
|
||||||
for i in range(64):
|
for i in range(64):
|
||||||
@ -214,7 +214,7 @@ class Reversi:
|
|||||||
|
|
||||||
def step(self):
|
def step(self):
|
||||||
if self.action < 0 or self.action > 63:
|
if self.action < 0 or self.action > 63:
|
||||||
ValueError("Wrong action!")
|
raise ValueError("Wrong action!")
|
||||||
if self.action is None:
|
if self.action is None:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user