I'm trying to figure out the proper way to code basically
English. Unfortunately, English has a
nasty habit of forgetting the Subject while remembering the Object. So when you type "Take [item]", the
player object is picking up the item
object. This just means the room's
inventory pointer vector loses the item, and the player's inventory gains
it. Except now if I'm searching the player's
input for an item first, then it will
figure out the item, then attempt to run the Take function within the item,
when I should be running the Take
function in the Player.
So it may be back to the drawing board. I don't want to throw so much in the
Interface class, but I don't want to throw everything in the Player class,
either.
Perhaps if I search for the hidden stuff first? Like have the Player class see if any
functions match the input, and failing that, try to check for items and
barriers? I can quickly see how the code
will get confusing if I'm not extremely careful here.
The past couple weeks have been much more thinking and a lot
less doing, because I don't want to completely break the game by accident.
Hopefully I can make some forward progress next week...
No comments:
Post a Comment