✨ Discover surronding cells only on empty
This commit is contained in:
@@ -44,7 +44,12 @@ export const useActions = (grid: GridType, setGrid: React.Dispatch<React.SetStat
|
|||||||
return revealAllGrid(grid, true);
|
return revealAllGrid(grid, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (prev[rowIndex][colIndex].value === 'empty') {
|
||||||
return discoverAroundCell(prev, rowIndex, colIndex);
|
return discoverAroundCell(prev, rowIndex, colIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
prev[rowIndex][colIndex].hidden = false;
|
||||||
|
return prev;
|
||||||
});
|
});
|
||||||
forceUpdate();
|
forceUpdate();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user