diff --git a/.gitignore b/.gitignore deleted file mode 100644 index fd20fdd..0000000 --- a/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ - -*.pyc diff --git a/Alphaproj.py b/Alphaproj.py index 84c8d70..32ee658 100644 --- a/Alphaproj.py +++ b/Alphaproj.py @@ -1,9 +1,9 @@ import time from construct import createRoad, createTurtles, randomTurtles,createRanking -def createtheWorld(): - length = createRoad.create() - t = createTurtles.create() - time.sleep(1) - time_r = randomTurtles.makeItMove(t, length) - createRanking.create(time_r,t) +length = createRoad.create() +t = createTurtles.create() +time.sleep(1) +time_r = randomTurtles.makeItMove(t, length) +createRanking.create(time_r,t) +input() \ No newline at end of file diff --git a/construct/__pycache__/__init__.cpython-37.pyc b/construct/__pycache__/__init__.cpython-37.pyc index bd433ad..f93c9f2 100644 Binary files a/construct/__pycache__/__init__.cpython-37.pyc and b/construct/__pycache__/__init__.cpython-37.pyc differ diff --git a/construct/__pycache__/createRoad.cpython-37.pyc b/construct/__pycache__/createRoad.cpython-37.pyc index fc34284..cb790e3 100644 Binary files a/construct/__pycache__/createRoad.cpython-37.pyc and b/construct/__pycache__/createRoad.cpython-37.pyc differ diff --git a/construct/__pycache__/createTurtles.cpython-37.pyc b/construct/__pycache__/createTurtles.cpython-37.pyc index b43867b..de8fab9 100644 Binary files a/construct/__pycache__/createTurtles.cpython-37.pyc and b/construct/__pycache__/createTurtles.cpython-37.pyc differ diff --git a/construct/__pycache__/randomTurtles.cpython-37.pyc b/construct/__pycache__/randomTurtles.cpython-37.pyc index 15f7d27..0c56e7a 100644 Binary files a/construct/__pycache__/randomTurtles.cpython-37.pyc and b/construct/__pycache__/randomTurtles.cpython-37.pyc differ diff --git a/construct/createRanking.py b/construct/createRanking.py index 2a6a493..45b6c19 100644 --- a/construct/createRanking.py +++ b/construct/createRanking.py @@ -55,4 +55,3 @@ def create(timeindex, tur): goto (x, -55) x += 120 write (("%0.2f" % timeindex[2 * i + 1]), move=False, align="center", font=("Arial", 10, "bold")) - #Medals diff --git a/construct/createRoad.py b/construct/createRoad.py index e05475c..0872fc1 100644 --- a/construct/createRoad.py +++ b/construct/createRoad.py @@ -18,10 +18,14 @@ def create(): goto(-140,140) #Set the default position n = 0 bgcolor("white") + # onkey(makeshort(n),"U") + # onkey(makelong(n),"O") + # onkey(makemedium(n),"I") + # listen() screensize(480, 360) - n = int(textinput("Turtles' race","Please input the length of the road")) + n = int(textinput("Noti from Pornhub ", "Please enter the length of the road: ")) n = n + 1 #Draw lines of the road for step in range(n): diff --git a/construct/randomTurtles.py b/construct/randomTurtles.py index 81664e2..157ae34 100644 --- a/construct/randomTurtles.py +++ b/construct/randomTurtles.py @@ -29,24 +29,6 @@ def makeTutlePos(Tur, n): X.append (temp[0]) return X -#Sort list of turtle's index and time records -def makeTrueTime_r(time_r): - index = [] - time = [] - for j in range (4): - time.append (time_r[2 * j + 1]) - time.sort (reverse = True) - for i in range (4): - for j in range (i, 4): - if (time[i] == time_r[2 * j + 1]): - #Swap index - temp = time_r[2 * j] - time_r[2 * j] = time_r[2 * i] - time_r[2 * i] = temp - #Swap time - temp = time_r[2 * j + 1] - time_r[2 * j + 1] = time_r[2 * i + 1] - time_r[2 * i + 1] = temp # Sort list of turtle's index and time records def makeTrueTime_r(time_r): diff --git a/createUI.py b/createUI.py deleted file mode 100644 index c6b5475..0000000 --- a/createUI.py +++ /dev/null @@ -1,32 +0,0 @@ -from tkinter import * -from Alphaproj import * - -#--------------------------------------------------------------------# -#Set windows -root = Tk() -root.geometry("800x600+300-80") -root.title("Turtle Racing Boiz") -#--------------------------------------------------------------------# -def constructor(event): - #root.destroy() #This is Dangerous step. Need to think!!! :< - createtheWorld() -#--------------------------------------------------------------------# -#Set background -bgframe = Frame(root) -bgframe.pack(fill = BOTH) -#Background -bgphoto = PhotoImage(file = "images/login/Background.png") -background = Label(bgframe, image = bgphoto) -background.pack() -#Play button -playbutton = PhotoImage(file = "images/login/PlayButton.png") -play = Button(background, image = playbutton) -play.bind("", constructor) -play.place(x = 135, y = 430) -#Quit button -quitbutton = PhotoImage(file = "images/login/QuitButton.png") -quit = Button(background, image = quitbutton, command = bgframe.quit) -quit.place(x = 245, y = 515) -#--------------------------------------------------------------------# -#Main loop -root.mainloop() diff --git a/images/login/Background.png b/images/login/Background.png deleted file mode 100644 index 04b405f..0000000 Binary files a/images/login/Background.png and /dev/null differ diff --git a/images/login/PlayButton.png b/images/login/PlayButton.png deleted file mode 100644 index de1b949..0000000 Binary files a/images/login/PlayButton.png and /dev/null differ diff --git a/images/login/QuitButton.png b/images/login/QuitButton.png deleted file mode 100644 index f261036..0000000 Binary files a/images/login/QuitButton.png and /dev/null differ diff --git a/images/reward_medals/1st_Reward.gif b/images/reward_medals/1st_Reward.gif deleted file mode 100644 index 6486864..0000000 Binary files a/images/reward_medals/1st_Reward.gif and /dev/null differ