ref: 8dd98adec779c57b948dfc54823ab041afd507d7
parent: 905652ca37eb1fb90532b7c8f168ed3738f78468
author: mkf <mkf@cloud9p.org>
date: Tue May 21 20:54:31 EDT 2024
engine: fix a bug where glenda can't move, but game isn't over
--- a/engine.c
+++ b/engine.c
@@ -260,7 +260,6 @@
int
score1(Point p)
{
-
int min = 999, next;
if(p.x == 0 || p.x == SzX-1 || p.y == 0 || p.y == SzY-1)
@@ -312,8 +311,8 @@
else if(next == min)
nextdir = (nrand(++count) == 0) ? dir : nextdir;
}
- if(min > 100 && min != 999)
- state = Won;
+ if(min > 100)
+ state = Won;
else if(ptype[1] == Computer)
domove(nextdir);