1. A wagering game machine comprising: a game controller configured to instantiate a game state element based on game state element generation information and game state types, wherein the game state element is configured to present a wagering game, and wherein the game state element includes states, wherein each state includes behaviors; and an event controller to notify the game state element about events, wherein the events cause the game state element to move between the states and to perform the behaviors.