sourcerer-io / lots

A text based adventure game in ruby
53 stars 14 forks source link

Add Readline support #7

Open rubyFeedback opened 3 years ago

rubyFeedback commented 3 years ago

Cursor keys can work via:

Readline.readline('')

perhaps it can be tried automatically. via a rescue.

If possible, then user input is read via readline. Otherwise default to stdin.

rwoliver2 commented 3 years ago

It's been quite a while since I wrote this so I don't recall if I tried to use readline or not. I vaguely recall wanting to keep it cross-platform and I think I ran into some Windows and Mac issues with readline. But yes, that would work.