if Lock == False:
print "here"
draw_origin_displaysurf()
if player == SERVER:
while True:
buf = connection.recv(1024)
if len(buf) == 0:
pygame.quit()
sys.exit()
pygame.event.set_allowed(MOUSEBUTTONUP)
logger("server.txt","recv()")
i,j,x,y = tuple(buf.split(' '))
i,j,x,y = int(i),int(j),int(x),int(y)
pygame.draw.circle(DISPLAYSURF, WHITE, (x,y), 10)
cross[i][j] = WHITEPIECE
if is_win(cross,i,j):
DISPLAYSURF.blit(YOUSUCK_SURF,YOUSUCK_RECT)
pygame.display.update()
print "here"
draw_origin_displaysurf()
if player == SERVER:
while True:
buf = connection.recv(1024)
if len(buf) == 0:
pygame.quit()
sys.exit()
pygame.event.set_allowed(MOUSEBUTTONUP)
logger("server.txt","recv()")
i,j,x,y = tuple(buf.split(' '))
i,j,x,y = int(i),int(j),int(x),int(y)
pygame.draw.circle(DISPLAYSURF, WHITE, (x,y), 10)
cross[i][j] = WHITEPIECE
if is_win(cross,i,j):
DISPLAYSURF.blit(YOUSUCK_SURF,YOUSUCK_RECT)
pygame.display.update()