June 2018
Intermediate to advanced
310 pages
6h 32m
English
HQ is a special building that can produce other buildings. It keeps track of all the buildings it had built up until now. The same type of building can be built more than once:
class HQ { val buildings = mutableListOf<Building<*, Unit>>() fun buildBarracks(): Barracks { val b = Barracks() buildings.add(b) return b } fun buildVehicleFactory(): VehicleFactory { val vf = VehicleFactory() buildings.add(vf) return vf }}
All other buildings produce units. Units can be either infantry or armored vehicle:
interface Unit interface ...
Read now
Unlock full access