How to properly restart the function?
Hello, I wrote my blackjack and ran into a problem: after the hand is over and the winner is determined, the game_end () function is executed, which, in turn, calls game_start () b > to start a new game, but the new game works crookedly, and generally "stalls" on setTimeout.
How can I immediately start a new game after the end of a distribution?
Didn't go into details, but:
1. game_end should clear the this.inited variable. Therefore, it does not go beyond the timeout.
2. game_end should clean up event listeners that are hung by game_startAnonymous
To place the code, please use CodePen or similar tool. Thanks you!