When the player buys a tower, they have the possibility to place it where they want. In order to include this feature inside our game, we need to make some changes to our towers.
To begin with, we should notice that the player is not free to place their towers wherever they want to on the map. In fact, they cannot place them along the path where the enemies are moving or in areas where there is water. Therefore, we need to implement this constraint.
Thus, we need to look at our map and find all the spots where the player can place the tower. In our case, the spots that we are looking for are the following:
As we can ...