elif event.type == MOUSEBUTTONUP:
mousex, mousey = event.pos
if CREATEGAME_RECT.collidepoint(event.pos):
#connection,addr = create_game()
serverthread = ServerThread(1)
serverthread.start()
print 1
player = SERVER
if JOINGAME_RECT.collidepoint(event.pos):
sock = join_game()
player = CLIENT
Lock = False
mousex, mousey = event.pos
if CREATEGAME_RECT.collidepoint(event.pos):
#connection,addr = create_game()
serverthread = ServerThread(1)
serverthread.start()
print 1
player = SERVER
if JOINGAME_RECT.collidepoint(event.pos):
sock = join_game()
player = CLIENT
Lock = False