Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def setup():
- size(300, 300)
- background(200)
- lines()
- def lines():
- line(100, 0, 100, 300)
- line(200, 0, 200, 300)
- line(0, 100, 300, 100)
- line(0, 200, 300, 200)
- def linesAndColour():
- background(160, 32, 240)
- lines()
- def draw():
- if (mouseX >= 0 and mouseX <= 100 and mouseY >= 100 and mouseY <= 200):
- linesAndColour()
- elif (mouseX >= 200 and mouseX <= 300 and mouseY >= 100 and mouseY <= 200):
- linesAndColour()
- elif (mouseX >= 100 and mouseX <= 200 and mouseY >= 200 and mouseY <= 300):
- linesAndColour()
- else:
- setup()
Advertisement
Add Comment
Please, Sign In to add comment