I have a game loop that re-draws a game board after each player makes a move. I would like to pause the main loop and wait until a player places a piece on the board, i.e. triggers a mouse down event on the canvas. Right now the game loop continues to redraw the board. Is there a way to wait for the player to move before continuing the loop?I have a game loop that re-draws a game board a