Skip to content

Refactor cursor navigation

marcheing requested to merge refactor/frontend into master

This removes the link between the UI and the model. It used Map and Location to keep the cursor inside the map bounds.

With this, it can go out of bounds (The inspect message will be "Invalid selection"). This doesn't affect player movement since the checking for map bounds is done inside Location Component's _move method.

This makes the process of creating a "client" much easier, since it won't depend on components anymore. Also, it may make more sense to let the client decide what to do with an inspection that goes out of bounds.

Currently we also have the LookMode state, but perhaps it would be better to let the client, after receiving a complete SessionState with the components' descriptions, to show their inspect text like Crawl does. (Still, removing LookMode would only be useful after completely detaching the frontend).

Merge request reports