problem with exam task for college

Chris Angelico rosuav at gmail.com
Sat Jan 5 14:32:21 CET 2013


On Sun, Jan 6, 2013 at 12:14 AM,  <jeltedeproft at hotmail.com> wrote:
> that's probably it, how do i solve it?

I'm afraid I can't help you there. Check out the docs for the getkey
function and see if it can be put into non-blocking mode; if not, you
may have to completely change your model. For instance, if I were
writing this sort of game today, I'd probably use a GUI system that
fires an event whenever a key is pressed/released, and then have a
timer-tick for the descent, rather than explicit sleep() calls. But it
depends on your UI facilities.

The LANDER.BAS that I played with - yes, it was written in BASIC - was
fully prompt-driven. To move to the next time unit, you had to answer
all its prompts. Advantage: No need to code a Pause feature.
Disadvantage: The game ended up way too scientific, like D&D combat.
(It's amazing how your party of bumbling characters suddenly become
lightning-fast strategists as soon as initiative is rolled!)

ChrisA



More information about the Python-list mailing list