Skip to content

Commit

Permalink
fix: fixed deepcopy referance in getPossibleBoards
Browse files Browse the repository at this point in the history
  • Loading branch information
Eduard-Prokhorikhin committed Apr 27, 2024
1 parent 0d155ab commit b4e8bad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/game/tetris.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def getPossibleBoards(self) -> list["Tetris"]:
if not moveBoard.isValidBlockPosition(moveBoard.block):
continue

moveBoard.prevBoard = copy.deepcopy(moveBoard.board)
moveBoard.prevBoard = moveBoard.deep_copy_list_of_lists(moveBoard.board)
if moveBoard not in possibleMoves:
possibleMoves.append(moveBoard)

Expand Down

0 comments on commit b4e8bad

Please sign in to comment.