2015/3: fix red lines (assert arrays)

This commit is contained in:
2025-11-11 06:54:42 +01:00
parent 0b24a5828e
commit 6336bec39b
2 changed files with 6 additions and 6 deletions

View File

@@ -28,8 +28,8 @@ export default async function runner(inputPath: string) {
break;
}
if(!map[x]) map[x] = [];
if(map[x][y]) continue;
map[x][y] = true;
if(map[x]![y]) continue;
map[x]![y] = true;
houses++;

View File

@@ -35,10 +35,10 @@ export default async function runner(inputPath: string) {
default: break;
}
if(!map[x]) map[x] = [];
if(map[x][y]) {
if(map[x]![y]) {
continue;
}
map[x][y] = true;
map[x]![y] = true;
houses++;
} else {
@@ -58,10 +58,10 @@ export default async function runner(inputPath: string) {
default: break;
}
if(!map[roboX]) map[roboX] = [];
if(map[roboX][roboY]) {
if(map[roboX]![roboY]) {
continue;
}
map[roboX][roboY] = true;
map[roboX]![roboY] = true;
houses++;
}