This is a simple implementation of the classic Pon Game using Python and Object-Oriented Programming (OOP) principles and the Turtle graphics library. This project recreates the iconic Pong experience, allowing two players to compete in a virtual game of table tennis.
- Object-oriented design for clean code structure and easy maintenance.
- Utilizes the Turtle graphics library for simple and interactive visuals.
- Two-player mode for head-to-head competition.
- Score tracking to determine the winner.
- Python 3.x
-
Clone the repository:
git clone https://github.com/sepidehkhakzad/Pong.git
-
Navigate to the project directory:
cd Pong
-
Run the game:
python main.py
-
Player 1 controls:
W
to move the paddle upS
to move the paddle down
-
Player 2 controls:
- Up arrow key to move the paddle up
- Down arrow key to move the paddle down
-
The game ends when one player reaches the score limit, or you can exit the game at any time.
main.py
: Main Python script containing the game logic and implementation.paddle.py
: Paddle object class to keep track of the movement of the paddles.ball.py
: Ball object class to keep track of the position of the ball and change it after every collision.scoreboard.py
: Scoreboard object class to keep track of the scores.README.md
: Documentation file providing information about the project.
Here's a demo of how the game works:
- This project is a tribute to the classic Pong game, a pioneer in the world of video games.
- Special thanks to the Turtle graphics library for making graphics programming in Python fun and accessible.
Contributions are encouraged! Feel free to submit issues or pull requests to enhance the game.
This Pong Game project is licensed under the Apache License.
Enjoy the game! 🏓🎮