     #       v
     constructor: (@gameManager, @gameVisual, characterLoadconfig) ->
         # @config ?= { x: 4, y: 4, direction: 0, maxX:9, maxY:9, traps: [[2,4],[9,9]], targets: [[5,5]], targetCount : 0}
-        @config = @gameManager.config.game
+        @config = deepcopy @gameManager.config.game
         @score = 0
         @stars = 0
         @protagonist = {


    reset: =>
        @codeEditor.resetEditor()
        @visual.startGame @config.visual
        return


debugging = true
log = (mesg) ->  console.log mesg if debugging
if not deepcopy?
    deepcopy = (src) -> $.extend(true, {},src)

class window.GameManager
    constructor: (@environment) ->
