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,uid=None): super().__init__() self.tiles={} self.screen=screen self.sock=sock self.uid=uid def send_str(self,sock,str): sock.send((str+"\n").encode("utf-8")) def recvall(self,sock): BUFF_SIZE=4096 data=b'' while True: part=sock.recv(BUFF_SIZE) data+=part if len(part)