Wargames is a simple battle simulator in Java. In a Battle two armies will fight against each other. An army consists of
units. Units are special troops that can have special abilities.
The project was created as an obligatory submission in the subject IDATT2001 on computer engineering at NTNU.
Classes with "FSH" in the name shows that the class is a "filehandling system class". This means that it is responsible for reading and writing to files, and managing files.
The ArmyFSH stores and writes armies that are stored in memory. Units are stored in a csv file. The csv file always starts with the name of the army. The file name should also be the name of the army.
The Units are stored in the following fashion:
unitType,unitName,health,count
Where:
- unitType - type of Unit
- unitName - name of the Unit
- health - amount of healthPoints the unit has
- count - Amount of the unit in the Army
The count is there for saving space. Rather than having multiples of lines representing the same Unit, the count will save unnecessary data duplication.
Unit Factory creates units from strings. This is usually done hand in hand when parsing files. If new types of Units are added, they should also be added in the factory, if the Unit is wished to be used by the Factory.
Todo
- Apache maven
- Java 16