Skip to content

Mnemon1k/Drumncode-test-work

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

It is my test assignment for work. Main theme - recursion.

Logic

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.

Setup

install dependencies:

npm i

Once you are ready to test your solution please run

npm test