Git Product home page Git Product logo

pong-game's Introduction

Pong Game ๐Ÿ“

Welcome to the Pong Game! ๐ŸŽฎ This is a simple Python implementation of the classic Pong game using the Turtle graphics library. In this game, you control two paddles to keep a ball bouncing between them. The objective is to score points by preventing the ball from passing your paddle. ๐Ÿ†

Getting Started ๐Ÿš€

  1. Clone or download the repository to your local machine. ๐Ÿ“‚
  2. Open your terminal or command prompt and navigate to the directory where you saved the code. ๐Ÿ–ฅ๏ธ
  3. Run the main file, main.py, using Python: ๐Ÿ

Enjoy the game! ๐ŸŽ‰

Gameplay ๐ŸŽฏ

  • Use the up and down arrow keys to control the right paddle. โฌ†๏ธโฌ‡๏ธ
  • Use the 'W' and 'S' keys to control the left paddle. 'W' 'S'
  • The game starts as soon as you run the main.py file. ๐Ÿšฆ
  • Score points by preventing the ball from passing your paddle. โšฝ
  • The game will continue until you decide to exit it. ๐Ÿšช

Files ๐Ÿ“

  • main.py: This is the main script that runs the Pong game. It sets up the game screen, paddles, ball, and handles game logic, including scoring and collisions. ๐ŸŽฎ
  • ball.py: The Ball class defines the behavior of the ball in the game. It controls the ball's movement, collisions, and speed. ๐Ÿ
  • paddle.py: The Paddle class defines the behavior of the paddles in the game. It handles paddle movement and positioning. ๐Ÿ“
  • score.py: The Score class manages and displays the scores for both players on the screen. ๐Ÿ“Š

Game Controls ๐ŸŽฎ

  • Right Paddle: Up arrow (โฌ†๏ธ), Down arrow (โฌ‡๏ธ)
  • Left Paddle: 'W' ('W'), 'S' ('S')

Rules ๐Ÿ“œ

  • The game continues until you decide to exit it. ๐Ÿšช
  • Each time the ball passes a paddle and reaches the screen's edge, the opposing player scores a point. ๐Ÿ“ˆ
  • The first player to reach a predefined score limit wins. ๐Ÿฅ‡

Enjoy the Game! ๐Ÿ•น๏ธ

Feel free to modify the game, add new features, or improve upon it as you see fit. Have fun playing and learning from this project! ๐Ÿคฉ๐Ÿ‘พ๐Ÿš€

pong-game's People

Contributors

moeez777 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.