Fix oob error
All checks were successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/push/all-checks-complete Pipeline was successful
ci/woodpecker/pr/all-checks-complete Pipeline was successful

This commit is contained in:
Smaug123
2023-12-14 17:56:24 +00:00
parent 4088720fe8
commit 81bfeacbe0

View File

@@ -27,7 +27,7 @@ module Day14 =
targetPos <- pos + 1
let mutable hasMoved = false
while not hasMoved do
while pos < arr.Height && not hasMoved do
if Arr2D.get arr col pos = 0uy then
targetPos <- pos
hasMoved <- true
@@ -59,7 +59,7 @@ module Day14 =
targetPos <- pos - 1
let mutable hasMoved = false
while not hasMoved do
while pos >= 0 && not hasMoved do
if Arr2D.get arr col pos = 0uy then
targetPos <- pos
hasMoved <- true
@@ -91,7 +91,7 @@ module Day14 =
targetPos <- pos - 1
let mutable hasMoved = false
while not hasMoved do
while pos >= 0 && not hasMoved do
if Arr2D.get arr pos row = 0uy then
targetPos <- pos
hasMoved <- true
@@ -123,7 +123,7 @@ module Day14 =
targetPos <- pos + 1
let mutable hasMoved = false
while not hasMoved do
while pos < arr.Width && not hasMoved do
if Arr2D.get arr pos row = 0uy then
targetPos <- pos
hasMoved <- true