-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IE-0029: Basic IO #29
Conversation
One question is how to handle number input. Inform doesn't (currently) have an option kind, so we can't return a failure. (Unless we returned it in a separate value? Very messy.) Therefore we probably want to make the phrase ask the player a second time if their input wasn't a valid answer. That means reprinting the prompt as well. So maybe something like
|
Isn't it better to have a phrase which inputs an arbitrary text, which can then be composed with a phrase to convert text to a number? But there ways using inline definitions to make conditional assignments of the "if let" sort, if you reaaally want to. |
Ah, yeah that would probably be a better option. The author could use regexes to test the string is only a number (optionally wrapped in spaces), and if that check passes then parse it into a number. If it doesn't match then the author can print the prompt and ask again themselves. So then we'd only need one phrase for text input, but then a separate phrase to parse a text into a number. And maybe also to parse into a real number? If let... I do really like them, but when I've tried it before it's been really hacky. Something to consider for the future. |
I've begun working on this, and have more thoughts. Status lineBSE's status line phrases are basically completely disconnected from how Inform usually displays the status line, and in particular from the constructing the status line activity. The activity should be moved from the standard rules into basic inform. The basic IO phrase(s) would then be one particular way of using the activity. Picking a numberDialogKit defines |
(IE-0029) Basic IO
Summary
Extend the basic IO functionality of Basic Inform, including incorporating Basic Screen Effects.