From ac7f0e63b4e769df297dedd507355de99b167f43 Mon Sep 17 00:00:00 2001 From: Harsh Mittal Date: Thu, 28 Sep 2023 02:10:25 +0530 Subject: [PATCH] Added Code Objectives --- Tutorials/6_Game/lab1.py | 11 +++++++++-- Tutorials/6_Game/lab2.py | 7 +++++++ Tutorials/6_Game/lab3.py | 8 ++++++++ Tutorials/6_Game/lab4.py | 6 ++++++ Tutorials/6_Game/lab5.py | 7 +++++++ Tutorials/6_Game/lab6.py | 6 ++++++ Tutorials/6_Game/lab7.py | 9 +++++++++ Tutorials/6_Game/lab8.py | 6 ++++++ codeEditor.py | 1 + 9 files changed, 59 insertions(+), 2 deletions(-) diff --git a/Tutorials/6_Game/lab1.py b/Tutorials/6_Game/lab1.py index 03b0a09..6bd1fc1 100644 --- a/Tutorials/6_Game/lab1.py +++ b/Tutorials/6_Game/lab1.py @@ -1,3 +1,10 @@ +########################################## +""" +Lab:1 Objectives +- Create game screen with custom size +""" +########################################## + import pygame # Initialize Pygame @@ -5,8 +12,8 @@ ########## Make Changes Here############## -SCREEN_HEIGHT = # Enter the window Height -SCREEN_WIDTH = # Enter the window Width +SCREEN_HEIGHT = # Enter the window Height (>400) +SCREEN_WIDTH = # Enter the window Width (>400) SCREEN = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT)) ############## End Code ################## diff --git a/Tutorials/6_Game/lab2.py b/Tutorials/6_Game/lab2.py index 3ad6dd0..be20751 100644 --- a/Tutorials/6_Game/lab2.py +++ b/Tutorials/6_Game/lab2.py @@ -1,3 +1,10 @@ +########################################## +""" +Lab:2 Objectives +- Add Background Color +- Understand Layers Concept +""" +########################################## import pygame # Initialize Pygame diff --git a/Tutorials/6_Game/lab3.py b/Tutorials/6_Game/lab3.py index ea39eff..e6ecdbb 100644 --- a/Tutorials/6_Game/lab3.py +++ b/Tutorials/6_Game/lab3.py @@ -1,3 +1,11 @@ +########################################## +""" +Lab:3 Objectives +- Understand Layers in Game Development +- Understand Initial Text +- Understand Game Elements +""" +########################################## import pygame from dinoGame.elements import Track diff --git a/Tutorials/6_Game/lab4.py b/Tutorials/6_Game/lab4.py index 88ef638..c3f4a60 100644 --- a/Tutorials/6_Game/lab4.py +++ b/Tutorials/6_Game/lab4.py @@ -1,3 +1,9 @@ +########################################## +""" +Lab:4 Objectives +- Add More Game Elements +""" +########################################## import pygame from dinoGame.elements import Track, Dinosaur, Cloud diff --git a/Tutorials/6_Game/lab5.py b/Tutorials/6_Game/lab5.py index 76cfa6d..3d89a30 100644 --- a/Tutorials/6_Game/lab5.py +++ b/Tutorials/6_Game/lab5.py @@ -1,3 +1,10 @@ +########################################## +""" +Lab:5 Objectives +- Update Obstacle +- Create New Obstacles +""" +########################################## import pygame from dinoGame.elements import Track, Dinosaur, Cloud from dinoGame.elements import LargeCactus, Bird, SmallCactus diff --git a/Tutorials/6_Game/lab6.py b/Tutorials/6_Game/lab6.py index 2f5534b..f931ac9 100644 --- a/Tutorials/6_Game/lab6.py +++ b/Tutorials/6_Game/lab6.py @@ -1,3 +1,9 @@ +########################################## +""" +Lab:6 Objectives +- Detection Collision +""" +########################################## import pygame from dinoGame.elements import Track, Dinosaur, Cloud from dinoGame.elements import LargeCactus, Bird, SmallCactus diff --git a/Tutorials/6_Game/lab7.py b/Tutorials/6_Game/lab7.py index 17d120d..2de1919 100644 --- a/Tutorials/6_Game/lab7.py +++ b/Tutorials/6_Game/lab7.py @@ -1,3 +1,12 @@ +########################################## +""" +Lab:7 Objectives +- Init Score Text +- Game Score Text +- Update Game Score +- Update Total Score +""" +########################################## import pygame from dinoGame.elements import Track, Dinosaur, Cloud from dinoGame.elements import LargeCactus, Bird, SmallCactus diff --git a/Tutorials/6_Game/lab8.py b/Tutorials/6_Game/lab8.py index ca9eeac..4d4e97f 100644 --- a/Tutorials/6_Game/lab8.py +++ b/Tutorials/6_Game/lab8.py @@ -1,3 +1,9 @@ +########################################## +""" +Lab:8 Objectives +- Have Different Obstacles +""" +########################################## import pygame from dinoGame.elements import Track, Dinosaur, Cloud from dinoGame.elements import LargeCactus, Bird, SmallCactus diff --git a/codeEditor.py b/codeEditor.py index 04d59b4..1bfb5d6 100644 --- a/codeEditor.py +++ b/codeEditor.py @@ -33,6 +33,7 @@ def __init__(self): def textZoomIn(self): self.zoom_level *= 2 + self.zoom_level = min(self.zoom_level, 20) self.zoomTo(self.zoom_level) def textZoomOut(self):