Friday, July 25, 2014

Dev Log: Latchkey #56

I've started moving stuff finally to what I think is the appropriate place: the player class.  Everything needs to pass through the player class anyway, since it's the player that does the stuff, and what room the player is in can be found through a pointer in the player class, and the player's inventory, of course.

This means, unfortunately, I had to undo what I did last week when I was trying to move things to the Item class, which would have been quite a problem had I continued it.

I've also switched things up a bit so now the parser searches for the verb, the items and barriers, and everything else becomes a "descriptor", which may be an adjective that describes an object, or the direction the player wants to go, or a preposition (I think), like on or in.

Once it's been parsed into those pieces, I need to figure out which item/barrier the player is talking about, if there's more than one.  This is where I'm presently at, chugging along and plugging along.  It's vectors within vectors and comparisons within comparisons, so it's a bit to untangle.

No comments:

Post a Comment