馃殌 CYBER WEEK SALE: 50% OFF on JavaScript Fundamentals 馃挭

Task #250, Stage #1 - Gold Mine

Hey, Hero! This is your first task that consists of multiple stages. You鈥檒l be submitting your solution multiple times implementing a smaller piece of the big task. Be mindful not to break what was already working on previous stages....

August 15, 2020 路 1 min 路 Coderslang Master

Task #250, Stage #10 - Gold Mine

After implementing a producer purchase we need to make sure they do the work! Each second the producer should give us the amount of gold equal to their baseProduction. Add a new field productionRate to the config object exported from constants....

August 15, 2020 路 1 min 路 Coderslang Master

Task #250, Stage #11 - Gold Mine

The core of our mining game is implemented now. However, there are a few cosmetic things that we need to work on to provide a pleasant user experience. For starters, we鈥檒l improve our config by adding two flags isInitCompleted: false and isProducerListUpdated: true...

August 15, 2020 路 1 min 路 Coderslang Master

Task #250, Stage #12 - Gold Mine

The prep is done, so let鈥檚 start from the beginning. Once the user has enough gold to purchase the first producer, it makes sense to change the welcome message. I suggest creating a function checkInitCompleted that should be called from handleKeyPress once the user has enough gold to purchase the first producer....

August 15, 2020 路 1 min 路 Coderslang Master

Task #250, Stage #13 - Gold Mine

Next, we鈥檙e going to improve the UX by displaying the current list of producers. We鈥檒l implement the function updateProducerList(term, state) in functions.js It should print the list of producers, each on the new line starting from line 5....

August 15, 2020 路 1 min 路 Coderslang Master

Task #250, Stage #14 - Gold Mine

Wow! The previous stages must have been hard. We still have some work to do, though. It鈥檇 be very useful for the user to see the current production rate of their mining empire....

August 15, 2020 路 1 min 路 Coderslang Master

Task #250, Stage #15 - Gold Mine

You might have noticed, that there are occasional issues with displaying the numbers in our game. Sometimes, there appear long weird tails after the decimal point. The other times the numbers get so big that it鈥檚 hard to make sense of them....

August 15, 2020 路 1 min 路 Coderslang Master

Task #250, Stage #16 - Gold Mine

At the moment, we鈥檙e updating the UI once a second. It鈥檚 ok, but it鈥檇 be a lot smoother if it was updating more often. Let鈥檚 say 10 times faster. You鈥檒l need to change the code in quite a few places,...

August 15, 2020 路 1 min 路 Coderslang Master

Task #250, Stage #2 - Gold Mine

Our game should interact with the user in 2 ways. It should know how to accept the keyboard input, and it should know how to print messages to the console....

August 15, 2020 路 1 min 路 Coderslang Master

Task #250, Stage #3 - Gold Mine

So, you鈥檝e already exported the constant term that will allow us to control the terminal. Let鈥檚 make some use of it! Create the file functions.js and export the function init from it....

August 15, 2020 路 1 min 路 Coderslang Master