Re: [Tutor] Exiting a while

2013-07-06 Thread Steven D'Aprano
On 06/07/13 13:33, Jack Little wrote: How would I exit a while statement. The while is to keep the player in combat with an enemy until said enemy is dead. I tried using an if, but it just doesn't work. The devil is in the details, which you do not tell us. How precisely did you use an "if"?

Re: [Tutor] Exiting a while

2013-07-06 Thread Alan Gauld
On 06/07/13 04:33, Jack Little wrote: How would I exit a while statement. The while is to keep the player in combat with an enemy until said enemy is dead. I tried using an if, but it just doesn't work. In most cases you make the while condition false. while enemy.state != dead: # your loop

[Tutor] Exiting a while

2013-07-05 Thread Jack Little
How would I exit a while statement. The while is to keep the player in combat with an enemy until said enemy is dead. I tried using an if, but it just doesn't work. Jack___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription optio