Im used to event driven frameworks like Actionscript and Flash.
I am trying to figure out how to raise/handle a value change event.
You have a global variable called chipBalance.
The balance is updated in several places (e.g. start game deducts from it, winning adds to it).
You only want to update the balance on the screen when the value changes. You certainly dont want to poll the value every tick (for lots of events, this will kill performance, and is poor solution). You also dont want to duplicate the code to update the balnace on the screen in every place where the blance can change - you need an event!
I cant find it though. Anyone know how to do this without polling very tick?