I also cleaned up code a little more, by making things
slightly longer but more readable. In
the background, directions are just numbers, so 0 is north, 1 is east,
etc. But every time I try to use those
numbers, I have to sit there and think about which is which or look it up, so I
altered functions where I could so I could just put in a string for
readability. The function is now longer
(used to be like one line), but it is far easier to read. In fact I've been fixing errors for a while
because I forgot to start at zero in places, so things would get all mixed up.
But once that stuff got fixed, I was able to take a tour of
the school. Mostly empty, of course, but
working.
I also added a statement when you walk into a new room it
tells you what type of room you've just entered. I can't believe that was missing. At first I thought something was wrong in the
school when you walked into a classroom or office, because no description was
given, but that was just because they have no items in them yet. It didn't help that hallways always have a
painting in them (which they shouldn't), so their description wasn't blank.
Next comes making it so common areas don't randomize items
on instantiation, while unique areas do.
Then I might be able to get to making items to fill in the rooms.
No comments:
Post a Comment