# A Good ‘Ol Fashioned Rumble! (Ten Liner)

Uh oh, looks like there’s a rumble! Use your cursor to either flee the scene, or stay and fight. When the circles get closer together, the screen flashes to give the effect of punches being thrown. The biggest challenge I faced for this assignment was getting each circle to move at a different rate. The method I ended up using allows the speed of a circle to be faster if it was drawn towards the end of the for loop.

```##Will Taylor
## A Good 'Ol Fashioned Rumble (Ten Liner)
width, height = 400,400
circleXY = [[int(random(width)), int(random(height))],
[int(random(width)), int(random(height))],
[int(random(width)), int(random(height))],
[int(random(width)), int(random(height))],
[int(random(width)), int(random(height))],
[int(random(width)), int(random(height))],
[int(random(width)), int(random(height))],
[int(random(width)), int(random(height))],
[int(random(width)), int(random(height))],
[int(random(width)), int(random(height))]]
def setup():
size(width,height)
frameRate(32)

def draw():
background(255)
smooth()
strokeWeight(2)
stroke(0)

def checkMatch():
for i in xrange(len(circleXY)):
x = circleXY[i]
y = circleXY[i]
if (x == mouseX and y == mouseY):
background(0)
return True

def drawCircles():
for i in xrange(len(circleXY)):
if (i > len(circleXY)/2):
stroke(0)
fill(255)
else:
stroke(150)
fill(0)

def updateCircleX():
for i in xrange(len(circleXY)):
if (circleXY[i] > mouseX):
circleXY[i] -= int(2*(i+1)%4 + (i+1))
elif (circleXY[i] < mouseX):
circleXY[i] += int((i+2)%4 + (i+1))

def updateCircleY():
vChase = 1
for i in xrange(len(circleXY)):
if (circleXY[i] > mouseY):
circleXY[i] -= int(2*(i+1) - i)
elif (circleXY[i] < mouseY):
circleXY[i] += int(2*(i+1) - i)

def updateCircles():
updateCircleX()
updateCircleY()

drawCircles()

updateCircles()
checkMatch()

```