tricky and easy level on completion

This commit is contained in:
Robin P Clark 2019-12-23 18:39:00 +00:00
parent 2f9540cb5b
commit ca2aa91446

View File

@ -16,8 +16,9 @@ def redrawAll(canvas):
canvas.create_rectangle(0, 0, 1000, 1000, fill="grey") canvas.create_rectangle(0, 0, 1000, 1000, fill="grey")
# draw semi-transparent rectangles in the middle # draw semi-transparent rectangles in the middle
def leftclick(event): def leftclick(event):
print("player 1") print("tricky click")
#print event.x, event.y #print event.x, event.y
r = event.x/1000.0*3.0 -2.0 + rseed r = event.x/1000.0*3.0 -2.0 + rseed
i = (1000-event.y)/1000.0*2.0 -1.0 + iseed i = (1000-event.y)/1000.0*2.0 -1.0 + iseed
@ -34,11 +35,11 @@ def leftclick(event):
if mm < 21 and mm > 2: if mm < 21 and mm > 2:
print "you are in the CHAOS zone " print "you are in the CHAOS zone "
print "Stability factor=",mm," x=",ro,"y=",io print "Stability factor=",mm," x=",ro,"y=",io
if mm > 65 and mm < 80: if mm > 65 and mm < 75:
print "you found the RAGGED EDGE OF CHAOS YOU WON" print "you found the RAGGED EDGE OF CHAOS YOU WON with effort level TRICKY"
draw_complete() draw_complete()
def rightclick(event): def rightclick(event):
print("player 2") print("Easy click")
print event.x, event.y print event.x, event.y
r = event.x/1000.0*3.0 -2.0 + rseed r = event.x/1000.0*3.0 -2.0 + rseed
i = (1000-event.y)/1000.0*2.0 -1.0 + iseed i = (1000-event.y)/1000.0*2.0 -1.0 + iseed
@ -56,7 +57,7 @@ def rightclick(event):
print "you are in the CHAOS zone " print "you are in the CHAOS zone "
print "Stability factor=",mm," x=",ro,"y=",io print "Stability factor=",mm," x=",ro,"y=",io
if mm > 20 and mm < 80: if mm > 20 and mm < 80:
print "you found the RAGGED EDGE OF CHAOS YOU WON" print "you found the RAGGED EDGE OF CHAOS YOU WON with effort level EASY"
draw_complete() draw_complete()
def middleclick(event): def middleclick(event):
print("middle") print("middle")
@ -95,13 +96,13 @@ def mandelbrot (re, Im, max_iter):
def get_col(mm): def get_col(mm):
if ( mm > 99 ): if ( mm > 99 ):
return "black" return "black"
if ( mm > 90 ): if ( mm > 85 ):
return "blue" return "blue"
if ( mm > 80 ): if ( mm > 75 ):
return "cornflowerblue" return "cornflowerblue"
if ( mm > 69 ): if ( mm > 59 ):
return "green" return "green"
if ( mm > 60 ): if ( mm > 40 ):
return "cyan" return "cyan"
if ( mm > 30 ): if ( mm > 30 ):
return "pink" return "pink"