/pongGame

Pong game to practice working with classes etc. for 100 days of code python course

Primary LanguagePythonMIT LicenseMIT

Pong Game Project

This Pong Game project is a Python-based implementation of the classic Pong game. Target was to learn about object-oriented programming and classes.

Table of Contents

About

The Pong Game project is a classic Pong arcade game. It features two paddles and a bouncing ball. The objective is to prevent the ball from passing your paddle while trying to score points by getting the ball past your opponent's paddle.

How to Play

  • Use the Up and Down arrow keys to control the right paddle.
  • Use the W and S keys to control the left paddle.
  • The game starts automatically after a brief delay.
  • Score points by getting the ball past your opponent's paddle.
  • The game ends when the ball hits the side walls, and the score is displayed.

Project Structure

The project is organized into multiple Python files:

  • main.py: The main game file that sets up the game, controls user input, and manages the game loop.
  • paddle.py: Contains the Paddle class, which defines the behavior of the paddles.
  • ball.py: Contains the Ball class, which defines the behavior of the ball.
  • scoreboard.py: Contains the Scoreboard class, responsible for tracking and displaying the score.

Usage

To play the Pong Game:

  1. Clone this repository to your local machine.
  2. Ensure you have Python installed.
  3. Run main.py to start the game.