Implement the magic-cookie check and its test.

This commit is contained in:
Eric S. Raymond 2023-04-06 19:03:02 -04:00
parent d16822a583
commit 58cf204eba
4 changed files with 34 additions and 1 deletions

22
tests/badmagic.chk Normal file
View file

@ -0,0 +1,22 @@
Welcome to Adventure!! Would you like instructions?
> n
You are standing at the end of a road before a small brick building.
Around you is a forest. A small stream flows out of the building and
down a gully.
> resume
Can't open file y, try again.
Oops, that does not look like a valid save file.
You're in front of building.
>
You scored 32 out of a possible 430, using 1 turn.
You are obviously a rank amateur. Better luck next time.
To achieve the next higher rating, you need 14 more points.