From 04d9b148964d2af508ff0a97e458b4455cc6dac1 Mon Sep 17 00:00:00 2001 From: kercylan98 Date: Fri, 9 Jun 2023 18:39:32 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E4=B8=80=E4=B8=AA=E8=BF=9E?= =?UTF-8?q?=E7=BB=AD=E4=BD=8D=E7=BD=AE=E7=9A=84=E7=9F=A9=E9=98=B5=E4=B8=AD?= =?UTF-8?q?=EF=BC=8C=E7=89=B9=E5=AE=9A=E4=BD=8D=E7=BD=AE=E7=9B=B8=E9=82=BB?= =?UTF-8?q?=E7=9A=84=E6=9C=80=E5=A4=9A=E5=9B=9B=E4=B8=AA=E6=96=B9=E5=90=91?= =?UTF-8?q?=E7=9A=84=E4=BD=8D=E7=BD=AE=E6=97=B6=EF=BC=8C=E4=B8=8B=E6=96=B9?= =?UTF-8?q?=E5=90=91=E4=BD=8D=E7=BD=AE=E9=94=99=E8=AF=AF=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/g2d/g2d.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/g2d/g2d.go b/utils/g2d/g2d.go index a176a6e..375e85b 100644 --- a/utils/g2d/g2d.go +++ b/utils/g2d/g2d.go @@ -40,7 +40,7 @@ func GetAdjacentPositionsWithContinuousPosition[T any](matrix []T, width, pos in result = append(result, up) } if down := pos + width; down < size { - result = append(result, size) + result = append(result, down) } if left := pos - 1; pos >= 0 { result = append(result, left)