import pygame import random from pygame.sprite import Group from . import block,gameregistry from . import constants from .gameregistry import GameRegistry from .block import Block import pickle class Map: def __init__(self,screen,sock=None): super().__init__() self.tiles={} self.screen=screen self.sock=sock def send_str(self,str): self.sock.send((str+"\n").encode("utf-8")) def recvall(self): BUFF_SIZE=4096 data=b'' while True: part=self.sock.recv(BUFF_SIZE) data+=part if len(part)