Skip to content

OOP version Pong Game written in Python using the turtle library.

Notifications You must be signed in to change notification settings

resole79/pong_game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pong Game

OOP version Pong Game written in Python using the turtle library.

Pong is a table tennis–themed twitch arcade sports video game, featuring simple two-dimensional graphics, manufactured by Atari and originally released in 1972.

cabinet of Pong Game

Try to play Pong Game on ponggame.org

It's a part of the #100DaysOfCode challenge by Angela Yu.

Prerequisites

You will need the following software to run the Pong Game:

Installation

To get started with the Pong Game, follow these steps:

  1. Clone the repository:
git clone https://github.com/resole79/pong_game.git
  1. Run the main.py file:
python main.py

File Structure

  • main.py: Main program.
  • paddle.py: Paddle class
    • Method: move_paddle, paddle_up, paddle_down
  • ball.py: Ball class
    • Instance: x_position, y_position, ball_speed
    • Method: move_ball, collision_wall, collision_paddle, refresh_ball
  • scoreboard.py: Scoreboard class
    • Instance:score_my, score_pc
    • Method:game_over, increase_score1, increase_score2, increase_score2, refresh_score
  • display.py: MyWindow class
    • Instance*: window_list, this_window, x_coord, y_coord
    • Method: create_window
  • bord.py: BordGame class
    • Method: create_bord

Usage

Press keys to move the paddles:

  • Left Paddle (my_paddle):
    • "a" to move up
    • "d" to move down
  • Right Paddle (pc_paddle):
    • "Left" to move up
    • "Right" to move down

Pong Game

Pong Game

Credit

Author : Emilio Reforgiato (resole79)

About

OOP version Pong Game written in Python using the turtle library.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages