Skip to content

Major refactoring of main program code

Latest

Choose a tag to compare

@mdev34-lab mdev34-lab released this 17 Jun 16:22
· 1 commit to main since this release
2787021

Changelog - v1.1.0:

Key Changes

  1. Import Statements:

    • The updated version adds an import for MagicNumbers from lib.parameters.
  2. Ground Class:

    • A method place_ground is added with detailed comments explaining the code.
    • get_collision_coords method is added for collision detection.
  3. Player Class:

    • self.powerstate initialization now uses MagicNumbers.STARTING_POWERSTATE instead of a hardcoded 0.
    • self.fire_cooldown initialization remains unchanged.
    • In the coin_check method, the condition for incrementing powerstate is modified to check that powerstate is less than 2.
  4. Level Initialization:

    • The GROUND_WIDTH is now set using MagicNumbers.GROUND_WIDTH instead of a hardcoded value.
  5. Rendering Logic:

    • Minor changes in the Brick class for rendering and updating the screen.