Add after line 114:
if (deposited >= winScore)
timeleft = 0;
Now, when orbs are deposit and `Deposit()` gets called you'll artificially change the time. The function `CheckTime()` checks the time every second, so next time it runs it'll think the time has ended, so it'll call `EndGame()`. The first thing `EndGame()` does is to check the number of deposited orbs, so the player will see they have won.
↧