RanvierMUD / bundle-example-lib

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Command abbreviation

marado opened this issue · comments

The command parser currently states, where it expands l into look, that

TODO: replace this a priority list

I'd suggest that instead of a priority list commands could have in themselves an associated "weight", and the "heavier" a command is, the bigger its priority. Eg.:
If we have 3 commands:

  • who
  • where
  • which
    Typing w will do "west", because directions have precedence, but typing "wh" will tell the user we don't know what they want (and show these three as possibilities). But if we want who to have precedence, we can set who.weight=10.