On 4/5/07, belinda thom <[EMAIL PROTECTED]> wrote:

> My app needs to look something like this:
>
> ------
>
> create a game and display it in a matplotlib figure
>
> while game not over :
>
>     if its player 1's turn, get player 1's valid mouse input,
> otherwise get player 2's
>

You need to get out of the mold of thinking about while loops with
blocking input.  Instead make everything event driven and track state
variables to decide which player's mouse events to process.  So
instead of getting a blocking input, simply do nothing on events
unless you are in a certain state.  You can use a timer or an idle
handler for recurring processing rather than a while loop.

JDH

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to