]> git.lizzy.rs Git - plan9front.git/commitdiff
games/glendy: don't use lucida sans in menus by default and bugfix (thanks kemal)
authorcinap_lenrek <cinap_lenrek@felloff.net>
Fri, 2 Apr 2021 20:05:15 +0000 (22:05 +0200)
committercinap_lenrek <cinap_lenrek@felloff.net>
Fri, 2 Apr 2021 20:05:15 +0000 (22:05 +0200)
i have found one bug. when i put glenda in a position like this

i somehow win, but the glenda can escape from there.

in addition, i have changed the games manpage to include more info about glendy.

sys/man/1/games
sys/src/games/glendy.c

index 1abb4599a5d09633f4ff2d7f383d17379007947e..d04cca9f7a8b03dc7bd052d12352d8a0169ad576 100644 (file)
@@ -200,7 +200,9 @@ and
 add gibberish diagrams, equations and tables.
 .TP
 .B glendy
-Don't let the rabbit escape.
+Don't let the rabbit escape. Button 2 presents a menu that you
+can set the difficulty level from. Button 3 presents a menu
+that you can either play a new game, reset the game or exit.
 .TP
 .B juggle
 Display the juggling
index b7cc8bbd45ca8474af0b7d4594856f8794724f48..bc95017aefb7a597ec88f431e0430c7d028a849f 100644 (file)
@@ -386,7 +386,7 @@ nextglenda(void)
                        nextdir = (nrand(++count) == 0)?dir:nextdir;
                }
        }
-       if(min < 100)
+       if(min <= 100)
                domove(nextdir, p.x, p.y);
        else
                finished = Won;
@@ -459,7 +459,6 @@ main(int argc, char **argv)
        Mouse m;
        Event ev;
        int e, mousedown=0;
-       char *fontname;
 
        USED(argv, argc);
 
@@ -475,10 +474,6 @@ main(int argc, char **argv)
        initlevel();    /* must happen before "eresized" */
        eresized(0);
 
-       fontname = "/lib/font/bit/lucidasans/unicode.8.font";
-       if((font = openfont(display, fontname)) == nil)
-               sysfatal("font '%s' not found", fontname);      
-
        for(;;) {
                e = event(&ev);
                switch(e) {