mirror of
https://github.com/solero/houdini.git
synced 2024-11-08 12:18:20 +00:00
Fix mancala catching empty board, ben is a boomer
This commit is contained in:
parent
98f8c8ae02
commit
de00f8867c
@ -24,7 +24,7 @@ class MancalaLogic(ITable):
|
||||
continue
|
||||
opposite_hollow = 12 - hollow
|
||||
|
||||
if hand == 1 and self.board[hollow] == 0:
|
||||
if hand == 1 and self.board[hollow] == 0 and self.board[opposite_hollow] > 0:
|
||||
if (self.current_player == 1 and hollow in range(0, 6)) or (self.current_player == 2 and hollow in range(7, 13)):
|
||||
self.board[my_mancala] += self.board[opposite_hollow] + 1
|
||||
self.board[opposite_hollow] = 0
|
||||
|
Loading…
Reference in New Issue
Block a user