Skip to content
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

more user friendly i/o #4

Open
2 tasks
raspberryaether opened this issue Jan 29, 2017 · 0 comments
Open
2 tasks

more user friendly i/o #4

raspberryaether opened this issue Jan 29, 2017 · 0 comments
Assignees
Milestone

Comments

@raspberryaether
Copy link
Owner

raspberryaether commented Jan 29, 2017

Currently input is somewhat inconvenient as input is rather unconstrained and may cause undefined behavior. Output is also unnecessarily verbose and cryptic.

We should change this. Currently after a newline is used to lock in a roll, a new prompt shows the number of rolls remaining. There is no way to revise prior rolls. We should instead use the following state-based model:

  • Rearrange output to a grid structure, with N columns where N is the number of rolls per word.
  • When N cells are confirmed, the corresponding word is printed at the end of the line and the cursor moves to the first cell on the next line.
  • In any cell:
    • Numeric input is only accepted if it would result in a valid roll. Otherwise, an alert bell is emitted.
  • In an empty cell:
    • [Backspace] or [-] moves the cursor to the end of the previous cell or emits an alarm bell if this is not possible.
    • [Enter] or [.] emits an alarm bell.
  • In a non-empty cell:
    • [Backspace] or [-] removes the most recently entered digit and puts the cursor in its place.
    • [Enter] or [.] locks in the roll and moves the cursor to the next cell.

Acceptance criteria:

  • Input and output follows the new scheme detailed above.
  • Behavior is tested both with a terminal emulator and a Windows command prompt.
@raspberryaether raspberryaether self-assigned this Jan 29, 2017
@raspberryaether raspberryaether added this to the 0.1.0 milestone Feb 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant