nskins / goby

Command-line role-playing game framework
MIT License
122 stars 56 forks source link

Location Class #123

Closed nskins closed 6 years ago

nskins commented 6 years ago

We can specify the exact position of a Player by a Map and a pair of Y-X coordinates. Since both of these are necessary to specify a location, I've created a class (Location) to contain them and updated any relevant functions. This will be useful in the future when we remove regen_coords (see Map) in favor of a respawn_location for the Player. Additionally, we could probably write some checks to ensure the Location is "well-formed" (existing, passable, etc.), throwing an exception if it's not so.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 33210133dc2b48d8e1803977ebd4fdbfc1dc8389 on location into 4daa6a2bd26ba6c93afa90e252e68d063cd6c3e0 on 0.2.0.