int xLocation;
void setup() {
size(400,400);
background(255);
rectMode(CENTER);
xLocation = int(random(0,width));
println(xLocation);
}
void draw() {
fill(200,0,0);
rect(width/2, height/2, 10,10);
fill(0,0,200);
rect(width/2 + xLocation/2, height/2, 10,10);
rect(width/2 - xLocation/2, height/2, 10,10);
}