Skip to content

Commit 9a57e24

Browse files
committed
Changed slide down logic.
1 parent 4055f9b commit 9a57e24

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Assets/Scripts/FillStrategies/SlideDownFillStrategy.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,10 @@ private bool CanDropDiagonally(IGameBoard<IUnityItem> gameBoard, GridSlot<IUnity
241241
GridPosition direction, out GridPosition gridPosition)
242242
{
243243
var sideGridSlot = gameBoard.GetSideGridSlot(gridSlot, direction);
244-
if (sideGridSlot is { NotAvailable: true })
244+
var downGridSlot = gameBoard.GetSideGridSlot(gridSlot, GridPosition.Down);
245+
246+
if (sideGridSlot is { NotAvailable: true } &&
247+
downGridSlot != null && downGridSlot.State.IsLocked == false)
245248
{
246249
return gameBoard.CanMoveDown(sideGridSlot, out gridPosition);
247250
}

0 commit comments

Comments
 (0)