American Young Coder Academy – Indo

Loading Events

« All Events

  • This event has passed.

7 PM – Advanced Python Game Development

December 1, 2021 @ 7:00 pm - 8:00 pm

Today We Do
  1. We reviewed inheritance where with inheritance, we can avoid duplicating codes.
  2. We went over the homework on how to properly override Turret.load_image(self) and Turret.get_turret_angle(self) inside EnemyTurret.
  3. We extracted codes inside PlayerTank.update() which handles tank movement into its own method “tank_movement_control”. This way we can override this method in EnemyTank.tank_movement_control to make the enemy tank move independently.
Homework
  1. Make the enemy tank not able to go through the wall. Look at how we did it for Player Tank.
  2. PlayerTank.load_images(self) is overriden inside EnemyTank.load_images(self). But there are too many codes being duplicated. Extract the code inside PlayerTank.load_images(self) which will get the image path into its own method. And then override this method inside EnemyTank.

Details

Date:
December 1, 2021
Time:
7:00 pm - 8:00 pm
Event Categories:
,
Verified by MonsterInsights