An open API service indexing awesome lists of open source software.

https://github.com/anshmnsoni/turtle-crossing-game


https://github.com/anshmnsoni/turtle-crossing-game

gui oops-in-python python turtle

Last synced: 8 months ago
JSON representation

Awesome Lists containing this project

README

          

# ๐Ÿข Turtle Crossing Game

This is an upgraded version of the classic Turtle Crossing Game built using Python's `turtle` module. Help the turtle cross the road while avoiding incoming cars!

---

## ๐Ÿš€ Features

- ๐ŸŽฎ **Player-Controlled Turtle**
- ๐Ÿ’ฅ **Randomly Generated Moving Cars**
- โค๏ธ **3 Lives System**
- ๐Ÿ†™ **Level Progression (Cars get faster)**
- ๐Ÿง  **Scoreboard**
- โธ๏ธ **Pause/Resume with 'P' Key**
- ๐Ÿ **Win/Loss Messages**

---

## ๐Ÿ“ File Structure
.

โ”œโ”€โ”€ main.py # Main game loop

โ”œโ”€โ”€ TurtleClass.py # Player and scoreboard logic

โ”œโ”€โ”€ obstacles.py # Obstacle (car) generation

โ”œโ”€โ”€ README.md # Game documentation

---

## โ–ถ๏ธ How to Run

#### 1. Make sure you have Python installed.
#### 2. Clone the repository or download the files.
#### 3. Run the game:

```bash
python main.py
```

## ๐ŸŽฎ Controls
- โฌ†๏ธ Arrow Up โ€“ Move Turtle Forward

- โฌ‡๏ธ Arrow Down โ€“ Move Turtle Backward

- ๐Ÿ”˜ P โ€“ Pause/Resume the Game

## ๐Ÿ“ธ Screenshot
#### Preview
![image](https://github.com/user-attachments/assets/0df2e051-1c88-4b7c-b399-73b2742274f7)

## ๐Ÿ“Œ Dependencies
- Python 3.x
- Built-in turtle, random, and time modules

## ๐Ÿง‘โ€๐Ÿ’ป Author
### Ansh Soni
#### ๐ŸŽ“ Python Developer | Tech Enthusiast

### ๐Ÿ“ž Contact me
#### ๐Ÿ”—LinkedIn: [Connect with me](https://www.linkedin.com/in/anshmnsoni)


### Just play once,
### Enjoy the game! ๐ŸŽฎ
### Thank you ๐Ÿ’ซ