Describe parsing a bit
This commit is contained in:
parent
4cddd76b5f
commit
bdab6658b3
@ -60,3 +60,17 @@ The game would choose between all matched actions, filter to only the ones whose
|
|||||||
predicates are fulfilled, and choose from those the one with the highest priority.
|
predicates are fulfilled, and choose from those the one with the highest priority.
|
||||||
This might require a lot of typing, but I think it will have enough flexibility
|
This might require a lot of typing, but I think it will have enough flexibility
|
||||||
to do everything I might want to do.
|
to do everything I might want to do.
|
||||||
|
|
||||||
|
An action describing a transition would look as follows:
|
||||||
|
NORTH | * | 1 | You can't go north from here. |
|
||||||
|
NORTH | IN(initial_room) | 2 | You enter the nasty room. | GOTO(nasty_room)
|
||||||
|
NORTH | IN(other_room) | 2 | You enter the opulent room. | GOTO(opulent_room)
|
||||||
|
, but there's nicer syntax for transitions I'm sure.
|
||||||
|
*** Parsing
|
||||||
|
I'm sure we want a gallery of synonyms for most verbs and nouns. I assume we split the string
|
||||||
|
by spaces, making an array of canonical words, then write the actions around those canonical
|
||||||
|
words.
|
||||||
|
PULL | PULL,YANK,TUG
|
||||||
|
ROPE | ROPE,CORD,STRING,CABLE
|
||||||
|
With the above words, "PULL ROPE", "YANK CORD", or "TUG STRING" would all check for
|
||||||
|
actions as "PULL ROPE".
|
||||||
|
Loading…
Reference in New Issue
Block a user