Module 14 · In your browser · challenge 3 of 3 in this lesson
Challenges and recap
A code cell with the real Luau runner grades it. No Studio needed.
Open
Level 1, Apprentice
Challenge
Fix checkHealth in the sink-balance-check cell above so all four assertions pass.
- Start from
- The game at milestone m14 (download)
- Check it here
- Run the code cell; the challenge completes when it passes. No Studio needed.
Done means
- Returns false and 'inflation' when the Sink Ratio is below minRatio
- Returns false and 'balance-high' when the ending balance is above maxBalance
- Returns false and 'starved' when upkeep is more than half of earned
- Returns true and 'ok' for the shipped Regular month at a 0.99 Sink Ratio
- All four assertions in sink-balance-check pass