Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: Testing Zork-style game

by andyf (Pilgrim)
on Jun 28, 2004 at 18:28 UTC ( #370281=note: print w/replies, xml ) Need Help??

in reply to Testing Zork-style game

Just a thought. Is the output unique for every state in the game? If not ( I suspect it isn't - ie you will be in many situations which return "You are in a room with a window, there is one door to the North and one door to the South" coresponding to completely different game states.) then a test suite mapping input to output doesn't prove your implementation in quite the same way. My approach might be to write a function in the C, Perl, and Lisp implementations that dumps the game state in a standard format. Use that in your tests. When you have proved that the same state sequence solves the game, then add your output - the same for every implementation. Interesting to read Knuths take on Adventure! BOL Andy

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://370281]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2016-10-25 17:42 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (326 votes). Check out past polls.