Exemplo n.º 1
0
class Game1pInvisible(Game):
  def __init__(self):
    Game.__init__(self)
    self.field = Field(10, 20, invisible = True)
    
  def start(self):
    while True:
      # restart
      self.field.restart()
      while True:
        # display
        self.screen.fill(BLACK)
        self.screen.blit(self.field.draw(), (20, 20))
        pygame.display.flip()
        # routine work
        quit, restart = Game.routine(self)
        if quit: return
        if restart: break
Exemplo n.º 2
0
class Game1p4wide(Game):
  def __init__(self):
    Game.__init__(self)
    self.field = Field(4, 20)

  def start(self):
    while True:
      # restart
      self.field.restart()
      self.field.recieveAttack(1)
      self.field.clearAttack()
      while True:
        # display
        self.screen.fill(BLACK)
        self.screen.blit(self.field.draw(), (20, 20))
        pygame.display.flip()
        # routine work
        quit, restart = Game.routine(self)
        if quit: return
        if restart: break