I am using Vue and js.
When the game starts, it calls a function that changes the flag to be true. But I want the function to wait until the flag becomes false.