Make a two-player hockey game! The application will consist of two rectangular paddles, starting on each side of the screen, and one circular ball that players must bounce around. Players can move the paddles in any direction to hit the ball into the goal. If the ball makes contact with safe parts of the screen, it will bounce off at a random angle but in the same general direction (left or right). It will do the same if it makes contact with one of the paddles but will head towards the opposite general direction instead. If the ball touches the goals on either side of the screen, the application will say “Game Over. Player _ Wins”. You must put your code in classes and have separate keys for each player to move their paddles.
<aside> 💡 This will probably take a while. However, you can do it if you approach the problem step by step:
</aside>
Create the Flappy Bird game! You are provided with starting code and game resources. The starting code, however, doesn’t run by itself.
<aside>
💡 In order to make it run, you have to:
0. Setup by downloading the zipped template code and icons (flappy_bird.zip) and unzipping it. The code file you will be editing is OOPflappybird.py
GameObj’s draw methodGameObj’s check_collision methodTubes classdraw_score and draw_buttons methods in the FlappyBird class</aside>
💻 Zipped template code and icons
<aside> ⚖️ Copyright © 2021 Code 4 Tomorrow. All rights reserved. The code in this course is licensed under the MIT License.
If you would like to use content from any of our courses, you must obtain our explicit written permission and provide credit. Please contact [email protected] for inquiries.
</aside>