Great! The manual mode is done, so we should think about automating our mining empire.
Add a new field producers
into the config
constant that was exported from solution.js
.
It should be an array of objects. Each element of the array producers
(each producer)
should have properties id
, title
, cost
, growthRate
, baseProduction
and count
.
Here’s are examples of what producers might look like:
{ id: 1, title: 'Miner', cost: 10, growthRate: 1.13, baseProduction: 0.1, count: 0 }
{ id: 2, title: 'Adventurer', cost: 100, growthRate: 1.17, baseProduction: 1, count: 0 }
{ id: 3, title: 'Professional', cost: 1200, growthRate: 1.14, baseProduction: 9, count: 0 }
Each producer must have a unique ID
This task is part of the Full-Stack JavaScript Course.
If you have any issues with it, you can ask for community help below the post.
Feel free to help others if you’ve already solved the task.