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.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store