57-Switch between levels
In this post, we will implement the game levels, where the enemy type will be changed to a more challenging type when leveling up.
At the moment, the other enemy types are represented by different geometric shapes.
First, a dictionary is created to map different levels and different enemy types as follows:
When all enemies in each level (i.e., three waves of enemies) are killed, add 1 to the level.
If reaching the last level (level 4), only spawn one Boss enemy.