I'm not an expert in developing games, but I believe a solid approach is to keep the game state in a data structure and let the screen display represent the current status. When the status changes, the display is updated accordingly.
Maybe have a look at the Backgammon sample app (http://www.tersus.com/#Id=3912). A simpler example is the Memory Game (http://www.tersus.com/#Id=2248).
To use the full functionality of this web site, JavaScript needs to be turned on.
For best results, use the Firefox browser..
Copyright © 2003-2017 - Tersus Software Ltd., All rights reserved. Terms of Use License Graphic design by EmaraDesign