From de00f8867ca240c0c8850f9a9c7e026358af9dcd Mon Sep 17 00:00:00 2001 From: AllinolCP <56921534+AllinolCP@users.noreply.github.com> Date: Mon, 7 Feb 2022 09:08:29 +0700 Subject: [PATCH] Fix mancala catching empty board, ben is a boomer --- houdini/handlers/games/mancala.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/houdini/handlers/games/mancala.py b/houdini/handlers/games/mancala.py index 292e7c6..ce160d9 100644 --- a/houdini/handlers/games/mancala.py +++ b/houdini/handlers/games/mancala.py @@ -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