Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- seveur:
- string=str(model.map.width) +" "+str(model.map.height)+" "
- for y in range(0,model.map.height):
- for x in range(0,model.map.width):
- string += str(model.map.array[y][x])
- client:
- self.model.map.width=int(split[0])
- self.model.map.height=int(split[1])
- pos=0
- array=[]
- raw=[]
- for c in split[2]:
- raw.append(c)
- pos+=1
- if pos%int(split[0])==0 :
- array.append(raw)
- raw=[]
- self.model.map.array=array
- connexion_serveur.sendall(b"ok")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement