Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsreader4.netcologne.de!news.netcologne.de!xlned.com!feeder7.xlned.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.015 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'calls.': 0.07; 'feature.': 0.07; 'non-blocking': 0.09; 'pause': 0.09; 'gui': 0.11; "(it's": 0.16; 'fires': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'mode;': 0.16; 'wrote:': 0.17; 'instance,': 0.17; 'jan': 0.18; 'written': 0.20; 'sort': 0.21; 'not,': 0.21; 'explicit': 0.22; 'subject:problem': 0.22; 'suddenly': 0.22; "i'd": 0.22; 'header:In-Reply-To:1': 0.25; 'am,': 0.27; 'message- id:@mail.gmail.com': 0.27; 'there.': 0.28; 'probably': 0.29; "i'm": 0.29; 'basic': 0.30; 'function': 0.30; 'code': 0.31; 'docs': 0.33; 'to:addr:python-list': 0.33; "can't": 0.34; 'received:google.com': 0.34; 'received:209.85.220': 0.35; 'received:209.85': 0.35; 'next': 0.35; 'but': 0.36; 'characters': 0.36; 'depends': 0.36; 'subject:with': 0.36; 'too': 0.36; 'rather': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'help': 0.40; 'your': 0.60; 'amazing': 0.61; 'solve': 0.62; 'today,': 0.64; 'become': 0.65; 'afraid': 0.66; 'soon': 0.70; '2013': 0.84; 'played': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=VeWjQMgB5ZbHx8EydBCJjvkEZdu16XMnMDdTHgoBLNE=; b=VpnMNA6663K/7CV16EyHYk4Ms4+SI9CBKUYSSzXSzqcnEog9gJwqhNJD1iOFniZE0O 3XPPjf5xNi9rL8/JFkCM9r7NjjF+Ubsspt38pv88RWh28agU3s6/x6QdIjtDvbx80Bc2 539cBTPaRV6651YtHlzN6KptcGuVRgjvdcv0LqXUHI4NUW8GgIgWa9hGL+lbsEw7a9pz YaXKgP863cW6GKYavCRBFUytLrcrdQPjaWnWnegwTYzpFAM5Qk1q3LaHht/nzsnTUq8x xZ2jWKcDHrQMd/SvBXr5QA9HLoIGo9ZF2+odEPHH7WwDIWGc7yBmBPHMtHNdwBTDeM8W Wtyw== MIME-Version: 1.0 In-Reply-To: References: <6f3c7fdf-7439-43b1-b3a2-da9da019b1ec@googlegroups.com> Date: Sun, 6 Jan 2013 00:32:21 +1100 Subject: Re: problem with exam task for college From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1357392743 news.xs4all.nl 6979 [2001:888:2000:d::a6]:48330 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:36169 On Sun, Jan 6, 2013 at 12:14 AM, 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