def __init__(self,screen): self.mode = cbzt.MULTIPLAYER_LOCAL pygame.key.set_repeat(1,50) self.area = screen.get_rect() self.ball = Ball((80,240)) self.playerone = Player(40) self.playertwo = Player(600) self.left, self.right = True, False # ball always starts on the left self.top, self.bottom = False, False AbstractGame.__init__(self,screen,self.playerone,self.playertwo,self.ball)
def __init__(self,screen): self.mode = cbzt.SINGLEPLAYER pygame.key.set_repeat(1,50) self.area = screen.get_rect() self.ball = Ball((80,240)) self.player = Player(40) self.ai = AI(600,self.ball) self.left, self.right = True, False # ball always starts on the left self.top, self.bottom = False, False AbstractGame.__init__(self,screen,self.player,self.ai,self.ball)