Hi!
I'm new to JS gamedev, but I had a good experience in Flash/AS3.
So, I'm starting a board game, and I need to roll a dice/roulette every turn. A kind of window will appear over the board and the player will be prompted to click the roulette. It will return a value between 1~9.
What I have until now is ths: https://jsfiddle.net/snake/m317ona9/
As you can see in my code, I'm using create() and update() methods just to create this example. In real game it wouldn't be handled like that, but in middle of game.
I have not so much ideas on how I can make a nice architecture in my code.