diff --git a/1991/rince/Makefile b/1991/rince/Makefile index 681278ff1..5dcb45555 100644 --- a/1991/rince/Makefile +++ b/1991/rince/Makefile @@ -58,7 +58,7 @@ ARCH= # Defines that are needed to compile # -CDEFINE= -DMAX_MOVES=484 +CDEFINE= -DMAX_MOVES=${MAXMOVES} # Include files that are needed to compile # @@ -137,11 +137,13 @@ ${PROG}: ${PROG}.c alt: data ${ALT_TARGET} @${TRUE} +# variable to control max number of moves +MAXMOVES=484 ${PROG}.alt: ${PROG}.alt.c ${CC} ${CFLAGS} $< -o $@ ${LDFLAGS} ${PROG}2.alt: ${PROG}.alt2.c - ${CC} ${CFLAGS} $< -o $@ ${LDFLAGS} + ${CC} ${CFLAGS} -DMAX_MOVES=${MAXMOVES} $< -o $@ ${LDFLAGS} # data files # diff --git a/1991/rince/README.md b/1991/rince/README.md index f936ed236..7ed7df087 100644 --- a/1991/rince/README.md +++ b/1991/rince/README.md @@ -20,9 +20,10 @@ that's fewer than the original program. The first alternate version, [rince.alt.c](rince.alt.c), disables a maximum move count so that anyone with enough patience and time can complete the puzzle, -without having to worry about how many moves they make. The second version, -[rince.alt2.c](rince.alt2.c), allows one to reconfigure at compilation the -maximum number of moves, even if that is lowering the count. +without having to worry about how many moves they make, assuming they don't get +stuck. The second version, [rince.alt2.c](rince.alt2.c), allows one to +reconfigure at compilation the maximum number of moves, even if that is lowering +the count. The author set the maximum number of moves to 484. @@ -39,12 +40,13 @@ restrictions in the number of movements and the second one, `rince.alt2`, has a configurable maximum number of moves allowed, defaulting to the entry's max, 484. -To reconfigure the maximum number of moves: +To reconfigure the maximum number of moves to 700: ```sh -make clobber CDEFINE+="-DMAX_MOVES=5" alt +make clobber MAXMOVES=700 alt ``` + ### Alternate use: To run the first alt version: