My experimental use case for creating an OO-heavy project in TypeScript.
This repo is an experimental battle simulator, written in TypeScript, which which allows two "virtual armies" to fight in a make believe battle.
node build/src/exampleBattle.js
Optional arguments:
--army1=2500 --army2=2250 --rounds=10
If you want to change the specs of the battle, such as army size or number of rounds, open the index.ts
file and edit the variables listed under the "General Battle Config" section.
- Create a class for the unit type in the
classes/units
directory. - Add the unit type to the
classes/units/typeAliases.ts
typing file. - Make the unit spawnable within the
classes/units/types.ts
file.