Finally, we draw a text prompt at the bottom of the screen. The exact text depends on whether the human player is currently the active player or not, and whether the player is currently in the process of taking a shot.
Compile and deploy the project. Navigating to the game screen, you should now see the following image:
The gameplay screen, with the new HUD
While the game screen now contains much more information, it is still missing a key aspect, which is also the namesake of the game – the catapults. We will now focus on adding the Catapult class, which is responsible for drawing the game’s catapults and which will eventually be responsible for much of the game’s logic.
Create a new project folder and name it Catapult.
Add a new class under the Catapult project folder and name it Catapult.
Add the following using statements to the top of the newly created file:
One of the above using statements requires us to add an assembly reference to the project. This will allow the project to utilize the services implemented by the
Page | 43