« All Events
6 PM – Python Game Development – Sebastian
September 26, 2023 @ 6:00 pm - 7:00 pm
Today We Did
- Added direction functionality for the bird class
- You can always find the code we wrote in class in my Gitlab repository here:
https://gitlab.com/gsugiart/tue-6-pm-dragon-birdie/-/tree/TUE-6PM-Sebastian - In case you need anything, feel free to email me at sebastian@ayclogic.com
Homework
- Homework: Inside your create_bird() function in main.py, try to make birds spawn in both the left and right side of the screen.
- Generate a random direction (either LEFT or RIGHT global variables, use our list in config.py!)
- If the direction is LEFT, set x to WIDTH global variable (bird spawns on right side)
- If the direction is RIGHT, set x to 0 (bird spawns on left side)