Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iriw/pong-game-prj
Simple implementation of the classic Pong game using Python and the Turtle graphics library. It is part of the Udemy Course Challenge "100 Days of Code"
https://github.com/iriw/pong-game-prj
Last synced: about 1 month ago
JSON representation
Simple implementation of the classic Pong game using Python and the Turtle graphics library. It is part of the Udemy Course Challenge "100 Days of Code"
- Host: GitHub
- URL: https://github.com/iriw/pong-game-prj
- Owner: IriW
- Created: 2024-12-13T13:10:08.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-12-13T13:13:43.000Z (about 1 month ago)
- Last Synced: 2024-12-13T14:20:52.360Z (about 1 month ago)
- Language: Python
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pong Game Project
This project is a simple implementation of the classic Pong game using Python and the Turtle graphics library. It is part of the Udemy Course Challenge "100 Days of Code" and serves for learning purposes only as a Python learning project.
## Project Structure
- `main.py`: The main script that sets up the game screen, paddles, ball, and scoreboard. It contains the game loop and handles the game logic.
- `paddle.py`: Contains the `Paddle` class, which is responsible for creating and moving the paddles.
- `ball.py`: Contains the `Ball` class, which is responsible for creating and moving the ball, as well as handling collisions.
- `scoreboard.py`: Contains the `Scoreboard` class, which is responsible for keeping and displaying the score.
- `tests/`: Directory containing test files for the project.
- `test_ball.py`: Contains unit tests for the `Ball` class.
- `test_main.py`: Contains unit tests for the `Paddle` class.## How to Run
1. Ensure you have Python installed on your system.
2. Clone this repository to your local machine.
3. Navigate to the project directory.
4. Run the `main.py` script to start the game:
```sh
python main.py
```## How to Test
1. Ensure you have `pytest` installed:
```sh
pip install pytest
```
2. Navigate to the project directory.
3. Run `pytest` to execute the tests:
```sh
pytest
```## Game Controls
- Use the `Up` and `Down` arrow keys to move the right paddle.
- Use the `W` and `S` keys to move the left paddle.## Acknowledgements
This project is part of the Udemy Course Challenge "100 Days of Code" and serves for learning purposes only as a Python learning project.
Happy coding!