added error handling, random input etc
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
import random
|
||||
import socket
|
||||
|
||||
SERVER_IP = "127.0.0.1"
|
||||
PORT = 5901
|
||||
|
||||
input = random.randint(1, 1000)
|
||||
|
||||
# Manually set the starting "input" for the first team
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
s.connect((SERVER_IP, PORT))
|
||||
# Using "0" as the ID for the very first team's source
|
||||
s.send("ADMIN SET 0 80".encode()) # Sets the first clue as 80
|
||||
s.send(f"ADMIN SET 0 {input}".encode()) # Sets the first clue as 80
|
||||
print(f"Input of {input} Set")
|
||||
print(s.recv(1024).decode())
|
||||
s.close()
|
||||
|
||||
Reference in New Issue
Block a user