Two classic games in python: Pong and Sneak.
To play, first clone this repository using these commands:
git clone https://github.com/glensk/Pong
cd PongTo play snake, run pip3 install pygame once installed, run python3 snake.
Pong in python is for singleplayer or muyltiplayer.
- Upon start, type singleplayer or multiplayer.
- Uses keys "w" and "s" for left player.
- Use keys "up-arrow" and "down-arrow" for right player.
- to play, follow the steps below (install tkinter && Run Pong).
Now, we need to install the tkinter library for your specific version of
python. To find your version of python, type:
python3 --versionFor example, my Python version is 3.11, so I would install as
# π¨ Make sure to specify the correct Python version.
# ποΈ === UBUNTU / DEBIAN ===
sudo apt-get install python3.11-tk
# ποΈ === MacOS ===
brew install python-tk@3.11
# ποΈ === Fedora ===
sudo dnf install python3-tkinter
# ποΈ === CentOS ===
sudo yum install python3-tkinter
# ποΈ === Arch Linux (Manjaro, Antegros) ===
sudo pacman -S tkpython3.11 pong.pyDisclaimer: Adapted from https://github.com/VissaMoutafis/Pong and from https://www.geeksforgeeks.org/ create-pong-game-using-python-turtle/