from network import *

id = "rory1"

x = 400
y = 400

def setup():
    size(800,800)
    fill(155,155,255)

def draw():
    background(255)
    ellipse(x,y,25,25)
    
    queryDictionary = { "id":id, "x":x, "y":y }
    itemList = sendData(queryDictionary)

    i = 0
    while i < len(itemList):
        item = itemList[i]
        ellipse(item["x"],item["y"],25,25)
        i = i + 1


def keyPressed():
    global x,y
    if key == 'i':
        y = y - 2
    elif key == 'm':
        y = y + 2
    elif key == 'j':
        x = x - 2
    elif key == 'k':
        x = x + 2