     return root.gameDescriptions
 
 root.getGameSequence = ->
-    return @gameSequence if @gameSequence
-    @gameSequence = []
+    return root.gameSequence if root.gameSequence
+    root.gameSequence = []
     games = root.getGameDescriptions()
     addGame = (name) =>
-        return if $.inArray(name, @gameSequence)!=-1
+        return if $.inArray(name, root.gameSequence)!=-1
         doFirst = games[name].depends ?= []
         addGame g for g in doFirst
-        @gameSequence.push name
+        root.gameSequence.push name
         return
     addGame(g) for g,ignore of games
-    return @gameSequence
+    return root.gameSequence
 
 
 root.canPlay = (game) ->


    managerString  = description?.manager ?= 'GameManager'

    @currentGame = new window[managerString](env)

    @currentGame.startGame()

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




root.getPlayer = ->
    root.currentPlayer ?= root.load("CurrentPlayer")
    root.currentPlayer ?= {
        id : +(new Date())
        currentGame : ''
        first : ''
