👾 This project was built with Python/Pygame. The left paddle is controlled by using keys w(UP) and s(DOWN). The right paddle is controlled with the up and down arrows. Can be played single player but is more fun with a friend!
👩🏻💻 I built this project following the "Build Pong with Pygame" project tutorial on Codedex.
I started by importing the Pygame and Random modules. Then, I set up the screen color and dimensions as well as defining the shade of purple and white that I would use. I defined the paddles, ball, and added a clock.
Next, I made a loop that begins with a "Start Game" message and includes defining what keys will move what paddle as well as the direction. The loop also includes the movement of the ball and the "bounce back" when the ball makes contact with one of the paddles.
📝 (I changed the color of the paddles to be purple instead of white.) 📝 (The tutorial left code order out.)