I got the error messages to appear in the proper place, so if the game messes up, the message goes in the bottom left box, and if everything is fine, it goes in the top-middle box.
I've also got the examine command to work (I
think). It should work as normal, though
I haven't done every possible test case, since it's becoming harder and harder
to figure out what every possible test case is.
The way I do it is to put a trace statement between every line of code,
and as I come across them when I test, then I delete them because I know the
program got that far without an issue.
AS3 doesn't like to concatenate things, so I thought I was
being a good little programmer by using .concat(), but it wouldn't work and
messages would only appear fully if I just used += instead. The online documentation claims both ways produce
the same results, but not for me.
Perhaps because I'm trying to concat within a string vector or
something.
Anyway, examine/look works again. However, now I have a lot of duplicate code,
but the duplicate code has become necessary because I forgot to add into the
initial parsing just where each item
or barrier was found. So basically if
you try to look at "the door", and there are two doors, the barrier
vector points to them both, but it forgets that the doors are to the north and
east, so I can't say "There is a door to the east" without completely
rechecking for it. Same thing if the
player is looking at an item in the room or in hand.
So, back to the drawing board, to add locational data on the
initial runthrough.
No comments:
Post a Comment