Skip to content

Commit

Permalink
missed few checks when it comes to detect pending fall moves
Browse files Browse the repository at this point in the history
  • Loading branch information
ninetailsrabbit committed Jun 16, 2024
1 parent f2fd568 commit 1c15e33
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Match3Maker/Match3Maker.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<PropertyGroup>
<Title>Ninetailsrabbit.Match3Maker</Title>
<Version>1.1.7</Version>
<Version>1.1.8</Version>
<Description>This lightweight library provides the core logic and functionality you need to build engaging match-3 games. Focus on game design and mechanics while leaving the complex logic to this library</Description>
<Copyright>© 2024 Ninetailsrabbit</Copyright>
<Authors>Ninetailsrabbit</Authors>
Expand Down
6 changes: 4 additions & 2 deletions Match3Maker/src/components/Board.cs
Original file line number Diff line number Diff line change
Expand Up @@ -550,8 +550,10 @@ public VirtualBoard MovePiecesAndFillEmptyCells() {
currentCell.DiagonalNeighbourBottomRight;
}

bottomCell.AssignPiece(currentCell.Piece);
currentCell.RemovePiece();
if (bottomCell is not null && bottomCell.IsEmpty()) {
bottomCell.AssignPiece(currentCell.Piece);
currentCell.RemovePiece();
}

virtualBoard.AddUpdate(new BoardCellUpdate(UPDATE_TYPE.MOVEMENT, new(currentCell, bottomCell, bottomCell.Piece)));
}
Expand Down

0 comments on commit 1c15e33

Please sign in to comment.