Slight improvement to 1991/buzzard alt code
Now allows for 'q' to exit the maze. This is to be a bit more intuitive at least for those who use the alt version, which is not the recommended version to try first nor should it be. This change is not in the original nor should it be.
This commit is contained in:
1 parent
ac18d53f9f
commit
4304399561
2 files changed
+3
-2
No files matched your search
@@ -27,5 +27,5 @@ p=P(d+1);q=P(d);if
|
||||
(abs(y) ),++i)D(g+2*i+(s==-1),"--");}else if
|
||||
(abs(y) ==p)D(g-s*(2*p+1),"|");else D(g-
|
||||
(abs(y) *s*2),(s==1)^(y>0)?"\\":"/");}d-=s;}puts(
|
||||
"");h=0;}}f+=(b=='l')-(b=='h');f&=3;if(b=='k'){if(!m(1,0))continue;
|
||||
"");h=0;}}f+=(b=='l')-(b=='h');f&=3;if(b=='q')return 0;if(b=='k'){if(!m(1,0))continue;
|
||||
A+=X(f);B+=X(f-1);}}W((b=getchar())!=-1&&m(0,0)==1);return 0;}
|
||||
+2
-1
@@ -1125,7 +1125,8 @@ hard-coded but instead be `__FILE__`.
|
||||
Finally Cody added the [alternate
|
||||
version](1991/buzzard/README.md#alternate-code) which will possibly feel more at
|
||||
home with those familiar with vi(m) (it certainly does feel more at home with
|
||||
him): `k` for forward, `h` for left and `l` for right.
|
||||
him): `k` for forward, `h` for left and `l` for right. This version also has a
|
||||
more useful way to exit, just entering `q` followed by enter.
|
||||
|
||||
|
||||
## [1991/dds](1991/dds/dds.c) ([README.md](1991/dds/README.md]))
|
||||
|
||||
Reference in new issue
Block a user