A Room's precondition can be considered the set of Symbols from the other Rooms that the player must have collected to be able to reach this room. For instance, if the Room is behind a locked door, the precondition for the Room includes the key for that lock.
In practice, since there is always a time ordering on the collection of keys, this can be implemented as a count of the number of keys the player must have (the 'keyLevel').
The state of the {@link Dungeon}'s switch is also recorded in the Condition. A Room behind a link that requires the switch to be flipped into a particular state will have a precondition that includes the switch's state.
A Condition is 'satisfied' when the player has all the keys it requires and when the dungeon's switch is in the state that it requires.
A Condition x implies a Condition y if and only if y is satisfied whenever x is.
|
|
|
|
|
|
|
|
|
|