     env = {
         key: game
         description : description
-        visualMaster: @visualMaster
-        frameRate: @visualFrameRate
+        visualMaster: root.visualMaster
+        frameRate: root.visualFrameRate
         gamediv : gamediv
         player : root.getPlayer()
         codeland : this


    managerString  = description?.manager ?= 'GameManager'

    @currentGame = new window[managerString](env)

    @currentGame.startGame()

deepcopy = (src) -> $.extend(true, {},src)




root.getGameDescriptions = ->
    root.gameDescriptions ?= {
        sequence1 : _sequence1
        sequence2 : _sequence2
        sequence3 : _sequence3
        sequence4 : _sequence4
    }
root.getGameSequence = ->
    return root.gameSequence if root.gameSequence
    root.gameSequence = []
    games = root.getGameDescriptions()
    addGame = (name) =>
        return if $.inArray(name, root.gameSequence)!=-1
        doFirst = games[name].depends ?= []
        addGame g for g in doFirst
        root.gameSequence.push name
        return
    addGame(g) for g,ignore of games
    return root.gameSequence


root.canPlay = (game) ->
