diff --git a/1993/rince/README.md b/1993/rince/README.md index 6d0863d2b..7c6a867b9 100644 --- a/1993/rince/README.md +++ b/1993/rince/README.md @@ -5,7 +5,7 @@ make all ``` NOTE: there is an alternate version of this program that allows one to slow down -the game. See the Alternate code section below. +the game. See the [Alternate code](#alternate-code) section below. ## To use: @@ -18,7 +18,8 @@ where: `[cabbage]` is a CABBAGE description file (default: `rince.c`) -## Alternate code: slowing down the game + +## Alternate code Some people may want to slow down the game by increasing the value 17 in the lines: @@ -34,7 +35,10 @@ and refresh(),c=select(k,&y,0,0,(v.tv_usec=1<<17,&v))?getch():0; ``` -to another value like 18 or 19. You can do this via the alternate code like: +to another value like 18 or 19 which you can do with the alternate code. + + +### Alternate build: ```sh @@ -43,6 +47,9 @@ make CDEFINE="-DZ=18" clobber alt Replace 18 with whatever number you wish. + +### Alternate use: + Use `rince.alt` as you would `rince` above. @@ -97,6 +104,7 @@ select(k,&y,0,0,(v.tv_usec=1< o.. ... \.. --> 'o' .o. --> '.' ... .\. - - ``` However, the system I devised, in order to keep things small and neat(!), @@ -27,7 +24,6 @@ Hence: .o. ... .\. --> .\o ... ... - ``` This does of course have the odd problem with clashes. What if we want to diff --git a/1993/rince/rince.alt.c b/1993/rince/rince.alt.c index 5c9ce9039..9c94833be 100644 --- a/1993/rince/rince.alt.c +++ b/1993/rince/rince.alt.c @@ -120,4 +120,5 @@ int main(int open, U**exit) { t=(j*I*a(Q--,--Q))); t->y=J[Y][c]; J[Y][c]=t; fgets(t->x,20,C); } + endwin(); } diff --git a/1993/rince/rince.c b/1993/rince/rince.c index fbf443aa6..4afe3460a 100644 --- a/1993/rince/rince.c +++ b/1993/rince/rince.c @@ -120,4 +120,5 @@ int main(int open, U**exit) { t=(j*I*a(Q--,--Q))); t->y=J[Y][c]; J[Y][c]=t; fgets(t->x,20,C); } + endwin(); } diff --git a/thanks-for-fixes.md b/thanks-for-fixes.md index 10c91022c..92bb8c6d9 100644 --- a/thanks-for-fixes.md +++ b/thanks-for-fixes.md @@ -1610,7 +1610,11 @@ also checks for two args. See the README.md files for details. ## [1993/rince](1993/rince/rince.c) ([README.md](1993/rince/README.md])) -Yusuke supplied a patch to get this to work in modern systems. +Yusuke supplied a patch to get this to work in modern systems. This fix also +applies the compatibility issue of `select(2)` described in the README.md file. + +Cody added a call to `endwin()` to help with terminal sanity after the program +ends. Cody provided an alternate version to simplify slowing the game down. This was based on our suggestion that it might be desired to slow down but done in a way