Skip to content

feat: add UnitController which listens on click to UnitView

Ulrik Røsby requested to merge i24/unit-view-controller into master

Closes #24 (closed)

This is created to support the BattleMap's display of the range when the Unit is clicked. The flexibility with BatteMap's rendering is with the UnitController onUnitClick function, which is taken in as an argument in the constructor of the UnitController. It is here meant that the BattleMap can pass a function that handles the display of the range of the unit. The range of the unit can be retreived with the showRangeData()

Merge request reports