From 42bcfa3d720fa85c0b82f92e7e059641e95cdf56 Mon Sep 17 00:00:00 2001 From: Jordan Date: Sun, 12 Jul 2020 12:41:02 -0500 Subject: [PATCH] Renamed py files to make exe files more recognizable --- Binary Counter/{main.py => BCounter.py} | 0 Conway's GOL/{main.py => Game of Life.py} | 0 .../{main.py => EXTREME GARDENING.py} | 46 +++++++++---------- Ping/{ => Assets}/data.txt | 0 Ping/{main.py => Ping.py} | 4 +- .../{main.py => Sierpinski Carpet.py} | 2 +- 6 files changed, 26 insertions(+), 26 deletions(-) rename Binary Counter/{main.py => BCounter.py} (100%) rename Conway's GOL/{main.py => Game of Life.py} (100%) rename EXTREME GARDENING/{main.py => EXTREME GARDENING.py} (83%) rename Ping/{ => Assets}/data.txt (100%) rename Ping/{main.py => Ping.py} (98%) mode change 100755 => 100644 rename Sierpinski Carpet/{main.py => Sierpinski Carpet.py} (94%) diff --git a/Binary Counter/main.py b/Binary Counter/BCounter.py similarity index 100% rename from Binary Counter/main.py rename to Binary Counter/BCounter.py diff --git a/Conway's GOL/main.py b/Conway's GOL/Game of Life.py similarity index 100% rename from Conway's GOL/main.py rename to Conway's GOL/Game of Life.py diff --git a/EXTREME GARDENING/main.py b/EXTREME GARDENING/EXTREME GARDENING.py similarity index 83% rename from EXTREME GARDENING/main.py rename to EXTREME GARDENING/EXTREME GARDENING.py index cff513e..62815b2 100644 --- a/EXTREME GARDENING/main.py +++ b/EXTREME GARDENING/EXTREME GARDENING.py @@ -122,30 +122,30 @@ def gridDisplay(name, b):#Used to display names from arrays onto a grid pygame.draw.rect(screen,black,(18,18,60,23),3) screen.blit(font2.render("Back",False,black), (26,18)) screen.blit(sFont.render("Credits",False,black), (133,0)) - screen.blit(font2.render("Programmed by:",False,black), (126.5,55)) + screen.blit(font2.render("Programmed by:",False,black), (int(126.5),55)) screen.blit(font2.render("Jordan Camilletti",False,black), (127,80)) screen.blit(font2.render("Sponsored by:",False,black), (136,125)) screen.blit(font2.render("The Democratic United Data Electors(DUDE)",False,black), (3,150)) screen.blit(font2.render("Paid for by:",False,black), (149,195)) - screen.blit(font2.render("The Bureaucratic Recitative Offices(BRO)",False,black), (16.5,220)) + screen.blit(font2.render("The Bureaucratic Recitative Offices(BRO)",False,black), (int(16.5),220)) elif(stage==-1):#Help pygame.draw.rect(screen,black,(18,18,60,23),3) screen.blit(font2.render("Back",False,black), (26,18)) - screen.blit(sFont.render("Help:",False,black), (158.5,0)) - screen.blit(font2.render("CLICK ON THE SCREEN",False,black), (88.5,80)) - screen.blit(font2.render("GET TESTOSTERONE",False,black), (96.5,110)) - screen.blit(font2.render("GET THOSE GAINS",False,black), (109.5,140)) - screen.blit(font2.render("RESPECT YOUR ELDERS",False,black), (80.5,170)) - screen.blit(font2.render("ALWAYS USE YOUR TURN SIGNALS",False,black), (37.5,200)) + screen.blit(sFont.render("Help:",False,black), (int(158.5),0)) + screen.blit(font2.render("CLICK ON THE SCREEN",False,black), (int(88.5),80)) + screen.blit(font2.render("GET TESTOSTERONE",False,black), (int(96.5),110)) + screen.blit(font2.render("GET THOSE GAINS",False,black), (int(109.5),140)) + screen.blit(font2.render("RESPECT YOUR ELDERS",False,black), (int(80.5),170)) + screen.blit(font2.render("ALWAYS USE YOUR TURN SIGNALS",False,black), (int(37.5),200)) screen.blit(font2.render("DONATE TO CHARITY",False,black), (97,230)) elif(stage==0):#Starting screen.blit(sFont.render("EXTREME!",False,red), (116,25))#\n isn't allowed, so I need to do this - screen.blit(sFont.render("GARDENING!",False,red), (93.5, 65)) - screen.blit(font2.render("Start",False,black), (178.5, 150)) - screen.blit(font2.render("Help",False,black), (180.5,195)) - screen.blit(font2.render("Credits",False,black), (168.5,240)) + screen.blit(sFont.render("GARDENING!",False,red), (int(93.5), 65)) + screen.blit(font2.render("Start",False,black), (int(178.5), 150)) + screen.blit(font2.render("Help",False,black), (int(180.5),195)) + screen.blit(font2.render("Credits",False,black), (int(168.5),240)) for n in range(3): pygame.draw.rect(screen,black,(160,150+(n*45),80,25),3) #print(font2.render("",False,black).get_width()/2) @@ -159,7 +159,7 @@ def gridDisplay(name, b):#Used to display names from arrays onto a grid pygame.draw.rect(screen,black,[0,(n*100)-2,400,2]) for name in range(len(names)):#This extremely long line is for displaying the names on a 9x9 grid - screen.blit(font1.render(names[name][:-1],False,black) , (gridDisplay(name,1)-(font1.render(names[name],False,black).get_width()/2) , gridDisplay(name,0)+85)) + screen.blit(font1.render(names[name][:-1],False,black) , (gridDisplay(name,1)-int(font1.render(names[name],False,black).get_width()/2) , gridDisplay(name,0)+85)) img=pygame.image.load(photos[name][:-1]) screen.blit(img, (gridDisplay(name,1)-40 , gridDisplay(name,0)+5)) #((1+(name%3))*66)+((name%3)*66) @@ -178,7 +178,7 @@ def gridDisplay(name, b):#Used to display names from arrays onto a grid img=pygame.image.load(photos[flowerNum+9][:-1]) currImg=pygame.transform.scale(img, (findSize(img.get_width(),tes), findSize(img.get_height(),tes))) - screen.blit(currImg, (200-(currImg.get_width()/2),300-currImg.get_height())) + screen.blit(currImg, (200-int(currImg.get_width()/2),300-currImg.get_height())) screen.blit(pygame.image.load('Assets/Plants/dirt.png'), (0,260)) @@ -194,24 +194,24 @@ def gridDisplay(name, b):#Used to display names from arrays onto a grid screen.blit(font1.render("Increase:",False,black), (15,160)) screen.blit(font1.render("x{0}".format(tInc),False,black), (15,175)) - screen.blit(font1.render("Supa' Soil",False,black), (120-24.5,85)) - screen.blit(font1.render("Words of",False,black), (200-20.5,75)) + screen.blit(font1.render("Supa' Soil",False,black), (120-int(24.5),85)) + screen.blit(font1.render("Words of",False,black), (200-int(20.5),75)) screen.blit(font1.render("Encouragement",False,black), (200-38,85)) screen.blit(font1.render("Capitalism",False,black), (280-25,85)) - screen.blit(font1.render("Flower Power",False,black), (360-31.5,85)) + screen.blit(font1.render("Flower Power",False,black), (360-int(31.5),85)) screen.blit(font1.render("Protien Powder",False,black), (120-36,185)) - screen.blit(font1.render("Get a Real Job",False,black), (200-35.5,185)) - screen.blit(font1.render("Really Cool",False,black), (280-27.5,175)) + screen.blit(font1.render("Get a Real Job",False,black), (200-int(35.5),185)) + screen.blit(font1.render("Really Cool",False,black), (280-int(27.5),175)) screen.blit(font1.render("Gloves",False,black), (280-16,185)) screen.blit(font1.render("Gym",False,black), (360-11,175)) screen.blit(font1.render("Membership",False,black), (360-29,185)) - screen.blit(font1.render("UV Lights",False,black), (120-22.5,285)) + screen.blit(font1.render("UV Lights",False,black), (120-int(22.5),285)) screen.blit(font1.render("Extra",False,black), (200-12,275)) - screen.blit(font1.render("Mitochondria",False,black), (200-31.5,285)) - screen.blit(font1.render("Wrestling",False,black), (280-21.5,275)) - screen.blit(font1.render("Movies",False,black), (280-16.5,285)) + screen.blit(font1.render("Mitochondria",False,black), (200-int(31.5),285)) + screen.blit(font1.render("Wrestling",False,black), (280-int(21.5),275)) + screen.blit(font1.render("Movies",False,black), (280-int(16.5),285)) screen.blit(font1.render("SLIM JIMS™",False,black), (360-31,285)) for n in range(1,5):#Drawling shop grid diff --git a/Ping/data.txt b/Ping/Assets/data.txt similarity index 100% rename from Ping/data.txt rename to Ping/Assets/data.txt diff --git a/Ping/main.py b/Ping/Ping.py old mode 100755 new mode 100644 similarity index 98% rename from Ping/main.py rename to Ping/Ping.py index 3d3b12a..ccef35f --- a/Ping/main.py +++ b/Ping/Ping.py @@ -16,7 +16,7 @@ blue=(0,0,255) star=(10,10,244) font=pygame.font.SysFont('Impact', 40) -file=open("data.txt", "r") +file=open("Assets/data.txt", "r") finish=False currMatch=0 @@ -29,7 +29,7 @@ ballSpeed=paddleSpeed-1 movementX=ballSpeed*1 score=[0,0] -dataFile=open("data.txt","r") +dataFile=open("Assets/data.txt","r") data=[] screen=pygame.display.set_mode((screenXLen,screenYLen)) diff --git a/Sierpinski Carpet/main.py b/Sierpinski Carpet/Sierpinski Carpet.py similarity index 94% rename from Sierpinski Carpet/main.py rename to Sierpinski Carpet/Sierpinski Carpet.py index 544e4c6..be59379 100644 --- a/Sierpinski Carpet/main.py +++ b/Sierpinski Carpet/Sierpinski Carpet.py @@ -8,7 +8,7 @@ def findSize(t): return(math.floor(size/(3**t))) -size=int(input("Enter the size of the screen.\n")) +size=int(input("Enter the width of the screen.\n")) pygame.init() white=(255,255,255) black=(0,0,0)