 
 		dirFace: (@ldir) ->
 
-		newMove: (d) ->
-			@queue[@queue.length] = d
-			return
-
-		moveDir: (n) ->
-			return @queue[n]
-
-		ppo: () ->
-			if @queue.length == 1
-				@queue.splice(0, 1, 4)
-			else
-				@queue.splice(0, 1)
+		chngState: (act) ->
+			@state = act
+
+		state: () ->
+			return @state
 
 	getFrame: (config) ->
 		this.chckMv(config)

	startGame: (config) =>
		ar = config.animation.length
		objArray = []
		if frameClock
			clearInterval(frameClock)
		for key,set of config.characters
			tmp = new charObj(imgArray[set.imgSet],0,config.grid.border+(config.grid.gridUnit*set.x),config.grid.border+(config.grid.gridUnit*set.y),set.xOff,set.yOff,set.xSize,set.ySize)
			objArray[objArray.length] = tmp
		frameClock = setInterval this.coffeederp(config),frameLength
		return




	chckMv: (config) ->
		for obj in objArray
			if obj.state() == 0
				obj.imFace(0)
				obj.ypos = obj.ypos - config.animation.pixMoveRate
			if obj.state() == 1
				obj.imFace(1)
				obj.xpos = obj.xpos + config.animation.pixMoveRate
			if obj.state() == 2
				obj.imFace(2)
				obj.ypos = obj.ypos + config.animation.pixMoveRate
			if obj.state() == 3
				obj.imFace(3)
				obj.xpos = obj.xpos - config.animation.pixMoveRate

	swapFrames: (f1,f2) ->
		$(f1).css("z-index","3")
