The barrier description function has been bothering me for a
while, so I fixed it up thoroughly.
Now
I no longer have a bunch of If statements trying to figure out what type of
barrier it is with unique descriptions going in each direction, just to get the
direction word (e.g. "north") right.
Instead, the only distinct barrier it looks for is a wall, and skips the
description for that direction.
After
that, it checks to see if the barrier is open or see-through, and if so, says
things like "there is a bedroom beyond the counter to the
north".
If it's neither open nor
see-through, it just says "there is a door to the west" or
whathaveyou.
I also fixed up the
sextuple duplicate descriptions by using a For loop that uses the indexes of
the directions, with a constant vector of directional strings with the same
indexing.
I knew there was a simple way
to get around all that extra code; I just had to put two and two together.
I even got good grammar in there.
I also changed up the visuals so it's not so plain; I want
to give it the feel of old DOS text adventures, so I changed the font, borders,
background color, etc. I also made the
window wider to accommodate the style.
|
Now it looks like you're playing a DOS game on six oddly-shaped screens. |
I also fixed a bit of the grammar, so the directional
descriptions differentiate in style the direction, so you can see something
"to the north" but only see something "above", rather than
"to the above", which would make no sense. Had to correct that in two places... so far.
No comments:
Post a Comment