From 855b2017918fb08419e259a09d06c5e8f16b5a26 Mon Sep 17 00:00:00 2001 From: Siddharth Tiwari Date: Mon, 8 Apr 2024 13:34:04 +0530 Subject: [PATCH 1/3] Update chair.html --- bug-beatles/modern_chair/chair.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bug-beatles/modern_chair/chair.html b/bug-beatles/modern_chair/chair.html index 281fb2e..c510f68 100644 --- a/bug-beatles/modern_chair/chair.html +++ b/bug-beatles/modern_chair/chair.html @@ -19,7 +19,7 @@

Modern chair

Telford Kursi

-

$254 $530

+

$260 $530

From 37364dbe75e3afeaae34f96d22677129d96ba629 Mon Sep 17 00:00:00 2001 From: Siddharth Tiwari Date: Mon, 8 Apr 2024 14:53:31 +0530 Subject: [PATCH 2/3] . --- bug-beatles/Password_generator/index.html | 2 +- bug-beatles/modern_chair/styles.css | 6 +++--- .../__pycache__/cars.cpython-311.pyc | Bin 1697 -> 1711 bytes .../__pycache__/player.cpython-311.pyc | Bin 1240 -> 1254 bytes .../__pycache__/scoreboard.cpython-311.pyc | Bin 2101 -> 2115 bytes 5 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bug-beatles/Password_generator/index.html b/bug-beatles/Password_generator/index.html index 272b4a3..e6c7cb6 100644 --- a/bug-beatles/Password_generator/index.html +++ b/bug-beatles/Password_generator/index.html @@ -22,7 +22,7 @@

Password Generator

- diff --git a/bug-beatles/modern_chair/styles.css b/bug-beatles/modern_chair/styles.css index 4d35e14..32e613d 100644 --- a/bug-beatles/modern_chair/styles.css +++ b/bug-beatles/modern_chair/styles.css @@ -199,7 +199,7 @@ label.color-2 { opacity: 1; } .back-color.chair-3 { - background-image: linear-gradient(196deg, #8a9fb2, #5f7991); + background-image: linear-gradient(196deg, rgb(74, 74, 74), #6b6d6e); opacity: 0; } .for-color-3:checked ~ .back-color.chair-3 { @@ -380,10 +380,10 @@ h5 { background-color: #333; } .for-color-2:checked ~ .info-wrap .btn:before { - background-color: #1a1a1a; + background-color: rgba(143, 130, 130, 0.673); } .for-color-3:checked ~ .info-wrap .btn:before { - background-color: #40566e; + background-color: black; } .for-color-4:checked ~ .info-wrap .btn:before { background-color: #5e89b2; diff --git a/bug-beatles/python-turtle-crossing/__pycache__/cars.cpython-311.pyc b/bug-beatles/python-turtle-crossing/__pycache__/cars.cpython-311.pyc index 9527769e9b6a0ec1f65e8e753655c9994374a797..a81bba7066ebe3d697b44c95089f4500068f2e87 100644 GIT binary patch delta 57 zcmZ3;yPlVOIWI340}yyD5#Gox&MY6EY!wq)oLW>IW8sn0mT$-DjR|4c_mUxsV KZ8m1kV+H`q7ZH&F delta 43 xcmZ3_yO5WAIWI340}!<6vTx)TXBPBKv5IjjO)tqPO;;!=$}G;^?8uzQ3;^U&3#IW8sn0mT$-DjR|4c_mUxsV KZ8l+A!UO=}BoZzF delta 43 xcmaFHd4rRCIWI340}!<9vTx*;U=s9Bv5IjjO)tqPO;;!=$}G;^?8LN$2>|v83`_t3 diff --git a/bug-beatles/python-turtle-crossing/__pycache__/scoreboard.cpython-311.pyc b/bug-beatles/python-turtle-crossing/__pycache__/scoreboard.cpython-311.pyc index 74d51306f7e2a5d9957eb0b502a35225c8e95bb4..d8dc2c65ea55e4e3dafe3e0e2eb5f38f1004e3d6 100644 GIT binary patch delta 57 zcmdlga9DtQIWI340}yyD5#Gq1#Uvk_Y!wq)oLW>IW8sn0mT$-DjR|4c_mUxsV KZEj;)&k6wJMG~w4 delta 43 xcmX>suvLJ2IWI340}#yDVc*D|#U$vTVin_5nqHDonyye#lv$j+c?#2dRsi`p4B-F( From 63257f5249cabc49c353e1d1ebb550a8b088db64 Mon Sep 17 00:00:00 2001 From: Siddharth Tiwari Date: Mon, 8 Apr 2024 14:58:28 +0530 Subject: [PATCH 3/3] added y coordinate and speed features --- .../__pycache__/cars.cpython-311.pyc | Bin 1711 -> 1708 bytes .../__pycache__/player.cpython-311.pyc | Bin 1254 -> 1248 bytes bug-beatles/python-turtle-crossing/cars.py | 13 ++++++------- bug-beatles/python-turtle-crossing/main.py | 18 ++++++++++++++---- bug-beatles/python-turtle-crossing/player.py | 6 +++--- 5 files changed, 23 insertions(+), 14 deletions(-) diff --git a/bug-beatles/python-turtle-crossing/__pycache__/cars.cpython-311.pyc b/bug-beatles/python-turtle-crossing/__pycache__/cars.cpython-311.pyc index a81bba7066ebe3d697b44c95089f4500068f2e87..349044ccea9f1946415d8fa32a4d7ebfec5e4990 100644 GIT binary patch delta 281 zcmZ3_yM~u{IWI340}wRr5Kj9yk@p58)5K>nj5U*;8S5AsCm&+eWM)cXp8Sq6kdbAw z1Cuy2YYN-sC?;hlcE8CjOxkR0@tJvFok!en{o7!yGttBTt>v8Y%NtTCPwC{R2ZNc?DExXZ!Y$=<`>&)3CwkwfAN zhr|UAi5p_ln>RCSFj`6h)!bsKNX{=R5&|r5#zF|lsN!`_EGpK6YKi9n3KdTU5A#ssI>I#R{ z1rDhjViKD-Fl#VMN&{8hVyQ^ZFDeoSGb@2iO~xYG$sbwd83iW`vZgZ%O|E1$W@MYZ mmNk=26sV|3e6kFiA>)n7er!^_H#ki%fKdb62e!$jY~}#k^G5Rk diff --git a/bug-beatles/python-turtle-crossing/__pycache__/player.cpython-311.pyc b/bug-beatles/python-turtle-crossing/__pycache__/player.cpython-311.pyc index d829c07c4fe30a3d422a733d4573b08c2280d572..4da6e150688fd513e6427bb661f5f119ee6f7762 100644 GIT binary patch delta 85 zcmaFH`GAvmIWI340}!$a{&AjV(SiFSBIwbH+J(ya73hm8nH~V3Bw>pt9m5 jAn~Jt;VuVnCwmWjKVKK$MGlE891<5eBsOnlGGqb(MnM^e delta 91 zcmaFB`HYiyIWI340}yyD5l-XW$a{&AgCjmZGcU6we)3bsIY#^eIf<32MS4)Ncs8KY n;uIk9qk-Wr2X7~P5BqfviAx+37dfP^a7bO?klMVS$&d*E;+GqD diff --git a/bug-beatles/python-turtle-crossing/cars.py b/bug-beatles/python-turtle-crossing/cars.py index 3c84486..ee815ca 100644 --- a/bug-beatles/python-turtle-crossing/cars.py +++ b/bug-beatles/python-turtle-crossing/cars.py @@ -1,13 +1,14 @@ +# cars.py from turtle import Turtle import random -COLORS = ['blue', 'red', 'yellow', 'purple', 'green'] +COLORS = ['blue', 'red', 'yellow', 'purple', 'green'] class Cars(Turtle): - def __init__(self): - super().__init__() - self.x_move = 10 + def _init_(self, speed): + super()._init_() + self.x_move = speed # Initialize the speed of the cars self.color(random.choice(COLORS)) self.shape("square") self.shapesize(1, 2) @@ -15,6 +16,4 @@ def __init__(self): self.goto(280, random.randint(-230, 250)) def move(self): - self.goto(self.xcor()-self.x_move, self.ycor()) - - + self.goto(self.xcor()-self.x_move, self.ycor()) \ No newline at end of file diff --git a/bug-beatles/python-turtle-crossing/main.py b/bug-beatles/python-turtle-crossing/main.py index f6e4d15..fc13b88 100644 --- a/bug-beatles/python-turtle-crossing/main.py +++ b/bug-beatles/python-turtle-crossing/main.py @@ -11,19 +11,20 @@ scoreboard = Scoreboard() screen.setup(width=600, height=600) - screen.update() game_is_on = True all_cars = [] counter = 0 -screen.listen() +finish_line_y = 280 +car_speed = 10 +screen.listen() screen.onkeypress(player.up, "Up") while game_is_on: if counter % 3 == 0: - car = Cars() + car = Cars(car_speed) all_cars.append(car) counter += 1 @@ -34,7 +35,16 @@ break car.move() + if player.ycor() > finish_line_y: + for car in all_cars: + car.clear() # Clear the car from the screen + car.hideturtle() # Hide the car turtle + all_cars.clear() # Clear the list of cars + player.goto(0, -270) + scoreboard.update_level() + car_speed += 2 + time.sleep(0.1) screen.update() -screen.exitonclick() +screen.exitonclick() \ No newline at end of file diff --git a/bug-beatles/python-turtle-crossing/player.py b/bug-beatles/python-turtle-crossing/player.py index 2fa06c4..943ff47 100644 --- a/bug-beatles/python-turtle-crossing/player.py +++ b/bug-beatles/python-turtle-crossing/player.py @@ -3,12 +3,12 @@ class Player(Turtle): - def __init__(self): - super().__init__() + def _init_(self): + super()._init_() self.penup() self.shape("turtle") self.goto(0, -270) self.setheading(90) def up(self): - self.forward(20) + self.forward(20) \ No newline at end of file