juniper-wright / UtopianEngine

The Simple Text Adventure Game Engine
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

UtopianEngine::usGo() and ::usGoto() - make sure the room exists #60

Closed juniper-wright closed 11 years ago

juniper-wright commented 11 years ago

Before moving the player and modifying the _x and _y members, ensure that:

  1. The room is within the boundaries of the _rooms array.
  2. The Room::canTravel() returns true for that room.

Current behavior: Will move player to a room that does not exist.