FontysICT-sem1

Training BattleSim

Date Week 11/12
Version 1 - Inge van Engeland
Learning Objectives Class, Property, Constructor, private/public, UI separation.
Required prior knowledge Method, GUI, Basic Types, If.
Challenge Type Programming

sim

Introduction

In the game BattleSim you can fight with two players against each other. In this version, the left player is a Knight and the right player is a Ranger. Both players have 100 hit points each. It is a turn-based game, so in turns the players attack each other. The strength of the attack is between 0 (one miss) and 30. If the player takes a hit of more than 25, you have a “Critical hit.” The moment the number of hit points is 0 or less, then, unfortunately, that player has lost.

Assignment

Program the BattleSim. Figure is an example of what the screen might look like.

BattleSim command

Extra

Make up features to expand your BattleSim. For example: