It is my test assignment for work. Main theme - recursion.
There is a set of Power Plants and a set of Households. Every Household can be connected to any number of Power Plants. Power Plant feeds the Household with the Electricity. The Household has Electricity if it's connected to one or more Power Plants.
Each Power Plant is alive by default, but can be killed. The Power Plant which is not Alive will not generate any Electricity.
Household can be connected to Household. The Household which has the Electricity also passes it to all the connected Households.
The Power Plant can be repaired after killed.
npm i
npm test