From: James Edward Gray II Date: 2009-11-03T10:02:31+09:00 Subject: Re: [QUIZ] Hamurabi (#223) On Oct 31, 2009, at 6:23 PM, Daniel Moore wrote: > Back in the microcomputer age, there was a fascinating little game > called Hamurabi (no, that isn't a typo - there was an eight character > limit). Here's my sort-of solution (via Pastie because it's longish): http://pastie.textmate.org/680908 I started cleaning it up a bit today, but ran out of time. There's still a lot more that could be done. It also has a pretty big bug in it. My simple stack solution for GOTO, GOSUB, and FOR doesn't really work. It looked like it worked most of the way through the code because, GOTO's and GOSUB's only appear on their own lines or at the end of a compound instruction. The FOR loop at the end isn't like that though, and my interpreter doesn't really run it 10 times because it cannot resume into the middle of a compound instruction line. Drat, foiled again. I did have a ton of fun playing with this problem. Thanks again to the organizers for a great problem! James Edward Gray II