Print type of hazards in same order every time
authorJulian Cowley <julesreid@lavanauts.org>
Mon, 7 Mar 2022 18:48:15 +0000 (08:48 -1000)
committerJulian Cowley <julesreid@lavanauts.org>
Mon, 7 Mar 2022 18:48:15 +0000 (08:48 -1000)
It is important to print the hazards in the same order every time
whenever you are adjacent to them, such as the order they appear in
the loc variable (the Wumpus, pits, bats).

Currently, the hazards are printed in the order the rooms appear in
the cave list.  As an example, say you are in room 1 and there are
super bats in room 2, a pit in room 5, and the Wumpus in room 8.
The hazards are shown like this:

    BATS NEARBY!
    I FEEL A DRAFT
    I SMELL A WUMPUS!

This is problematic since someone might notice the order corresponds
to cave list and therefore figure out which type of hazard is in
each room.  Instead, the order based on the loc variable is:

    I SMELL A WUMPUS!
    I FEEL A DRAFT
    BATS NEARBY!

This gives no clues as to which room has what.


No differences found