You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a bug checking winning condition in columns in this project. The following state will not be counted as a winning state even though it has been won by both players at this point (player 1 in col 0 and player 2 in col 4):
[[ 0 0 -1 0 0 0 0]
[ 0 0 -1 0 0 0 1]
[ 1 1 1 -1 -1 0 -1]
[ 1 -1 -1 1 -1 0 1]
[ 1 -1 1 1 -1 1 -1]
[ 1 -1 1 1 -1 1 -1]]
The following is the corrected column checking code, as I do not have permissions to create a PR on this repo:
for row in range(self.board_shape[0] - self.win_condition - 1):
column = self.__board[:, col]
winning_set = column[row:row+self.win_condition]
value = sum(winning_set)
if abs(value) == self.win_condition:
return True```
The text was updated successfully, but these errors were encountered:
There is a bug checking winning condition in columns in this project. The following state will not be counted as a winning state even though it has been won by both players at this point (player 1 in col 0 and player 2 in col 4):
[[ 0 0 -1 0 0 0 0]
[ 0 0 -1 0 0 0 1]
[ 1 1 1 -1 -1 0 -1]
[ 1 -1 -1 1 -1 0 1]
[ 1 -1 1 1 -1 1 -1]
[ 1 -1 1 1 -1 1 -1]]
The following is the corrected column checking code, as I do not have permissions to create a PR on this repo:
The text was updated successfully, but these errors were encountered: