Examples
Player: {
prevRoom:
Event: Enter_Room{
// Checks of the room player entered is actually locked
// If the room is locked, moves player back to the previous room and displays some text
if (currentRoom().isLocked){
moveTo(prevRoom)
display("That room is locked!)
}
}
Event: Leave_Room{
prevRoom = currentRoom()
// Sets the value of prevRoom to the current room before the plater leaves
}
}