def __init__(self, map, *players): self.window = Window() self.event_handler = EventHandlerKey() self.players = players self.map = map self.dest = Dest() self.server = None
def __init__(self): self.src = '' self.weight = 0.0 self.to = Dest()
pygame.display.set_caption(conf.TITLE) # grid self.grid = pygame.Surface(conf.SIZE) self.grid.fill(conf.COLOR_KEY) for x in range(0,conf.WIDTH+1,conf.TILE): pygame.draw.line(self.grid,conf.COLOR_GRID,(x,0),(x,conf.HEIGHT),1) for y in range(0,conf.HEIGHT+1,conf.TILE): pygame.draw.line(self.grid,conf.COLOR_GRID,(0,y),(conf.WIDTH,y),1) self.grid.set_colorkey(conf.COLOR_KEY) def draw(self): self.screen.fill(conf.COLOR_BGROUND) self.screen.blit(self.grid, (0,0)) pygame.display.flip() def flip(self): pygame.display.flip() if __name__ == "__main__": # test w = Window() w.draw() d = Dest(5,5) d.draw(w.screen) pygame.display.flip() import time time.sleep(2)