Format
There really is no hope of making this code even half-way decent without spending the time to rewrite them all properly. Don't want to do any of that
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
from turtle import*
|
||||
from turtle import *
|
||||
import time
|
||||
import math
|
||||
|
||||
|
||||
speed_boat = 0.01
|
||||
|
||||
|
||||
def ship():
|
||||
clear()
|
||||
fd(130)
|
||||
@@ -27,6 +28,7 @@ def ship():
|
||||
lt(50)
|
||||
update()
|
||||
|
||||
|
||||
def ship_2():
|
||||
clear()
|
||||
fd(130)
|
||||
@@ -35,53 +37,53 @@ def ship_2():
|
||||
lt(130)
|
||||
fd(240)
|
||||
rt(130)
|
||||
|
||||
|
||||
|
||||
|
||||
def speed_more():
|
||||
global speed_boat
|
||||
speed_boat += 0.5
|
||||
|
||||
|
||||
|
||||
|
||||
def goleft():
|
||||
lt(1)
|
||||
bk(1)
|
||||
|
||||
|
||||
|
||||
|
||||
def goright():
|
||||
rt(1)
|
||||
bk(1)
|
||||
|
||||
|
||||
|
||||
def speed_less():
|
||||
global speed_boat
|
||||
speed_boat -= 0.5
|
||||
|
||||
|
||||
|
||||
def speed_stop():
|
||||
global speed_boat
|
||||
speed_boat = -1.35
|
||||
|
||||
|
||||
|
||||
def speed_exelerate_fast():
|
||||
global speed_boat
|
||||
speed_boat += 2
|
||||
|
||||
|
||||
|
||||
def speed_reduce_fast():
|
||||
global speed_boat
|
||||
speed_boat -= 2
|
||||
|
||||
|
||||
def reset_system():
|
||||
global speed_boat
|
||||
speed_boat = 0.01
|
||||
home()
|
||||
pu()
|
||||
setpos(-350,-50)
|
||||
setpos(-350, -50)
|
||||
pd()
|
||||
tracer(0)
|
||||
ht()
|
||||
|
||||
|
||||
|
||||
|
||||
reset_system()
|
||||
|
||||
@@ -98,4 +100,3 @@ while True:
|
||||
onkeypress(goleft, "Left")
|
||||
onkeypress(speed_less, "Down")
|
||||
listen()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user