mirror of
https://github.com/solero/houdini.git
synced 2024-11-24 06:27:20 +00:00
Fix find-four exploit
Prevent users from being able to take already occupied slots on row 5
This commit is contained in:
parent
a2999ad485
commit
509856a3af
@ -13,7 +13,7 @@ class ConnectFourLogic(ITable):
|
|||||||
|
|
||||||
def is_valid_move(self, col, row):
|
def is_valid_move(self, col, row):
|
||||||
if 0 <= row <= 5 and 0 <= col <= 6:
|
if 0 <= row <= 5 and 0 <= col <= 6:
|
||||||
if row == 5 or (self.board[col][row] == 0 and self.board[col][row + 1]):
|
if (row == 5 or self.board[col][row + 1]) and self.board[col][row] == 0:
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user