nskins / goby

Command-line role-playing game framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use regen_location for default location on Map

nskins opened this issue · comments

Currently, in the Player constructor, both the map and location must be specified and "valid" or else the Player will be placed on DEFAULT_MAP with DEFAULT_LOCATION. We should make it so that only the map can be specified, and, if so, the constructor will attempt to use the map's regen_location for the Player's initial location. If the regen_location is "invalid" (out-of-bounds or impassable), then proceed to place the Player on DEFAULT_MAP and DEFAULT_LOCATION as usual.

Pull requests can be sent to the default-loc branch.