[Tutor] break

Matthew Ngaha chigga101 at gmail.com
Fri Mar 15 00:23:07 CET 2013


>>              if Enemy.ships:
>>                  for missile in self.missiles:
>
>                        flag = False
>>
>>                      for rect in Enemy.rects:
>
>                            assert(!flag)
>
>>                          if QPoint(missile.x + 5, missile.y) in rect:
>>                              explosion = Explosion(rect.x(), rect.y())
>>                              self.explosions.append(explosion)
>
>                                flag = True
>>
>>                              break

im about to try the suggestions. i on python 3 and this line is giving
me a syntax error assert(!flag).


More information about the Tutor mailing list