There are too many setIntervals and setTimeouts. This can slow down the game and make it glitchy. Use requestAnimationFrame function ( except for the machine random picks) and/ or event listeners that would listen for when some property or state changes.
There are too many setIntervals and setTimeouts. This can slow down the game and make it glitchy. Use requestAnimationFrame function ( except for the machine random picks) and/ or event listeners that would listen for when some property or state changes.