From cce0395698f10c2ebc4df43fe43d55fa8a7e5911 Mon Sep 17 00:00:00 2001 From: kailando <94944679+kailando@users.noreply.github.com> Date: Mon, 27 Nov 2023 20:37:07 -0600 Subject: [PATCH] Update snake.a Added comment on line 3059 3036 errors when snake hits wall (probably invalid write pos) Done on https://www.calormen.com/jsbasic/ --- snake/snake.a | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/snake/snake.a b/snake/snake.a index 5310f10..54fc0d8 100644 --- a/snake/snake.a +++ b/snake/snake.a @@ -32,6 +32,7 @@ 3030 GOSUB 1000 3040 IF X(L) = FX AND Y(L) = FY THEN GOSUB 4000 3050 FOR I = 1 TO L +3059 REM 3060 - Adds collision detection for walls (errors when snake hits walls) 3060 HTAB X(I) : VTAB Y(I) 3070 PRINT "S" 3080 NEXT I @@ -49,4 +50,4 @@ 5010 X(I) = X(I + 1) 5020 Y(I) = Y(I + 1) 5030 NEXT I -5040 RETURN \ No newline at end of file +5040 RETURN