diff --git a/Teams/red_titans/Challenge1.py b/Teams/red_titans/Challenge1.py new file mode 100644 index 0000000..ff51aff --- /dev/null +++ b/Teams/red_titans/Challenge1.py @@ -0,0 +1,15 @@ +import socket + +HOST = "127.0.0.1" # localhost +PORT = 1234 # pixelflut-port + +with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock: + sock.connect((HOST, PORT)) + XMIN=641 + XMAX=1279 + YMIN=721 + YMAX=1079 + for y in range(YMIN, YMAX+1): + for x in range(XMIN, XMAX+1): + msg = bytes(f"PX {y} {x} FF0000\n", "UTF-8") + sock.sendall(msg) \ No newline at end of file