From: Eric S. Raymond Date: Mon, 3 Apr 2023 13:24:21 +0000 (-0400) Subject: Fix for Gitlab issue #65: revisiting "fee fie foe foo" and "fum". X-Git-Tag: 1.15~5 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=2dd1ccc53580a93a144b163006f32fe374921447;p=open-adventure.git Fix for Gitlab issue #65: revisiting "fee fie foe foo" and "fum". 100% coverage, "make oldcompare" passes. --- diff --git a/actions.c b/actions.c index 936e4d8..05c59d5 100644 --- a/actions.c +++ b/actions.c @@ -202,10 +202,9 @@ static phase_codes_t bigwords(vocab_t id) if ((foobar == WORD_EMPTY && id == FEE) || (foobar == FEE && id == FIE) || (foobar == FIE && id == FOE) || - (foobar == FOE && id == FOO) || - (foobar == FOE && id == FUM)) { + (foobar == FOE && id == FOO)) { game.foobar = id; - if ((id != FOO) && (id != FUM)) { + if (id != FOO) { rspeak(OK_MAN); return GO_CLEAROBJ; } @@ -214,8 +213,6 @@ static phase_codes_t bigwords(vocab_t id) (TOTING(EGGS) && game.loc == objects[EGGS].plac)) { rspeak(NOTHING_HAPPENS); return GO_CLEAROBJ; - } else if (id == FUM) { - goto fum; } else { /* Bring back troll if we steal the eggs back from him before * crossing. */ @@ -232,7 +229,6 @@ static phase_codes_t bigwords(vocab_t id) return GO_CLEAROBJ; } } else { -fum: rspeak(START_OVER); game.foobar = WORD_EMPTY; return GO_CLEAROBJ; diff --git a/tests/magicwords.chk b/tests/magicwords.chk index 54ab5a5..24df443 100644 --- a/tests/magicwords.chk +++ b/tests/magicwords.chk @@ -65,10 +65,18 @@ OK OK +> say fum + +What's the matter, can't you read? Now you'd best start over. + > z OK +> find foo + +Nothing happens. + > z OK @@ -1871,7 +1879,7 @@ OK What's the matter, can't you read? Now you'd best start over. > -You scored 253 out of a possible 430, using 315 turns. +You scored 253 out of a possible 430, using 317 turns. You have reached "Junior Master" status. diff --git a/tests/magicwords.log b/tests/magicwords.log index f636711..4b86370 100644 --- a/tests/magicwords.log +++ b/tests/magicwords.log @@ -46,7 +46,7 @@ z say fee say fie say foe -#say fum +say fum z find foo z