IPVGO: Ensure there is always at least one offline node (#2030)

This commit is contained in:
Michael Ficocelli
2025-03-17 18:59:19 -04:00
committed by GitHub
parent 47b34c8563
commit 19f859ae87

View File

@@ -15,7 +15,7 @@ export function addObstacles(boardState: BoardState) {
const shouldAddCenterBreak = !shouldRemoveCorner && !shouldRemoveRows && random(0, 3);
const obstacleTypeCount = +shouldRemoveCorner + +shouldRemoveRows + +shouldAddCenterBreak;
const edgeDeadCount = random(0, (getScale(boardState.board) + 2 - obstacleTypeCount) * 1.5);
const edgeDeadCount = random(1, (getScale(boardState.board) + 2 - obstacleTypeCount) * 1.5);
if (shouldRemoveCorner) {
boardState.board = addDeadCorners(boardState.board, random);