From 0cc4ba731305e22e2ee81030ff1adc585f1ec574 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Thu, 9 Nov 2023 09:40:45 -0800 Subject: [PATCH] Add another alt version to 1993/rince + formatting The formatting of the README.md file has been completed. Typos were also fixed. The formatting of the design.md has been completed. Typos were also fixed. The second alt version makes movement for the default game (which is in the source code itself) more familiar to vi users. It is an exercise for others to change the somewhat awkward keys for other games. Looking at design.md might be of help there. The bugs.md has been updated with a set of features, not bugs, that should no be fixed. --- 1993/rince/Makefile | 4 +-- 1993/rince/README.md | 77 ++++++++++++++++++-------------------------- 1993/rince/design.md | 15 ++++----- bugs.md | 11 +++++++ thanks-for-fixes.md | 8 +++-- 5 files changed, 57 insertions(+), 58 deletions(-) diff --git a/1993/rince/Makefile b/1993/rince/Makefile index f5eb64762..199952b45 100644 --- a/1993/rince/Makefile +++ b/1993/rince/Makefile @@ -115,8 +115,8 @@ OBJ= ${PROG}.o DATA= TARGET= ${PROG} # -ALT_OBJ= ${PROG}.alt.o -ALT_TARGET= ${PROG}.alt +ALT_OBJ= ${PROG}.alt.o ${PROG}.alt2.o +ALT_TARGET= ${PROG}.alt ${PROG}.alt2 ################# diff --git a/1993/rince/README.md b/1993/rince/README.md index 7c6a867b9..c2d4cbeb6 100644 --- a/1993/rince/README.md +++ b/1993/rince/README.md @@ -4,8 +4,22 @@ make all ``` -NOTE: there is an alternate version of this program that allows one to slow down -the game. See the [Alternate code](#alternate-code) section below. +NOTE: there are two alternate versions of this program, both allowing one to +slow down the game and the second one with movements more familiar to vi users. +See the [Alternate code](#alternate-code) section below. + + +### Bugs and (Mis)features: + +The current status of this entry is: + +``` +STATUS: INABIAF - please **DO NOT** fix +``` + +For more detailed information see [1993 rince in bugs.md](/bugs.md#1993-rince). + + ## To use: @@ -37,6 +51,11 @@ refresh(),c=select(k,&y,0,0,(v.tv_usec=1<<17,&v))?getch():0; to another value like 18 or 19 which you can do with the alternate code. +In the case of [rince.alt2.c](rince.alt2.c) the movement keys for the default +game are slightly different and will feel more familiar to vi users: `h` for +left, `l` for right (that was not changed) and `k` for fire (that was also not +changed). + ### Alternate build: @@ -50,7 +69,7 @@ Replace 18 with whatever number you wish. ### Alternate use: -Use `rince.alt` as you would `rince` above. +Use `rince.alt` or `rince.alt2` as you would `rince` above. ## Judges' remarks: @@ -72,38 +91,6 @@ considered finished when all the `m`s are then `M`s. For a brief design description, see [design.md](design.md). -The `select(2)` from SunOS says: - -``` -BUGS - -... - -select() should probably return the time remaining from the -original timeout, if any, by modifying the time value in -place. This may be implemented in future versions of the -system. Thus, it is unwise to assume that the timeout -pointer will be unmodified by the select() call. -``` - -Systems such as Linux do return the remaining time in timeout -field (0 if no keys were pressed), but `rince` assumes that -timeout remains unmodified. - -It has been suggested that: - -```c -select(k,&y,0,0,&v) -``` - -should be replaced with: - -```c -select(k,&y,0,0,(v.tv_usec=1<