File tree Expand file tree Collapse file tree 7 files changed +517
-111
lines changed
Expand file tree Collapse file tree 7 files changed +517
-111
lines changed Original file line number Diff line number Diff line change 1515#host = (sys.argv[4],int(sys.argv[5]))
1616host = ("localhost" ,8001 )
1717
18+ log = open ("log.txt" ,'w' )
19+ sys .stdout = log
20+
1821map = []
1922bmap = []
2023exp = []
@@ -236,6 +239,8 @@ def read(id):
236239team = 0
237240teamn = 0
238241
242+ sock = socket (AF_INET ,SOCK_STREAM )
243+
239244while True :
240245 if start == "running" :
241246 #print players["Bot0"].speed
Original file line number Diff line number Diff line change @@ -15,6 +15,9 @@ start = "lobby"
1515#host = (sys.argv[4],int(sys.argv[5]))
1616host = ("localhost",8001)
1717
18+ log = open("log.txt",'w')
19+ sys.stdout = log
20+
1821map = []
1922bmap = []
2023exp = []
@@ -45,7 +48,7 @@ bg = pygame.image.load("Images/"+"bg.png").convert()
4548shade = pygame.image.load("Images/"+"shade.png").convert_alpha()
4649fighter = pygame.image.load("Images/"+"fighter.png").convert_alpha()
4750target = pygame.image.load("Images/"+"target.png").convert_alpha()
48- font = pygame.font.Font("",20)
51+ font = pygame.font.Font("font.ttf ",20)
4952victory = None
5053vcount = 0
5154
@@ -236,6 +239,8 @@ classn = 0
236239team = 0
237240teamn = 0
238241
242+ sock = socket(AF_INET,SOCK_STREAM)
243+
239244while True:
240245 if start == "running":
241246 #print players["Bot0"].speed
Original file line number Diff line number Diff line change 1+ import socket
2+ from socket import *
3+
4+ def lobby_accept ():
5+ sock = socket (AF_INET ,SOCK_STREAM )
6+ sock .bind (('' ,8001 ))
7+ while True :
8+ sock .listen (1 )
9+ sock ,addr = sock .accept ()
10+ len = sock .recv (2 )
11+ call = sock .recv (int (len ))
Original file line number Diff line number Diff line change 1+ import socket
2+ from socket import *
3+
4+ def lobby_accept():
5+ sock = socket(AF_INET,SOCK_STREAM)
6+ sock.bind(('',8001))
7+ while True:
8+ sock.listen(1)
9+ sock,addr = sock.accept()
10+ len = sock.recv(2)
11+ call = sock.recv(int(len))
You can’t perform that action at this time.
0 commit comments