 
 		for y in [0..7]
 			for x in [0..7]
-				thisX = Math.abs (2 - x)
-				thisY = Math.abs (4 - y)
-				if (thisX == 0 && thisY == 2) || (thisY == 1 && thisX == 2)
+				thisX = Math.abs (3 - x)
+				thisY = Math.abs (5 - y)
+				if (thisX == 1 && thisY == 2) || (thisY == 1 && thisX == 2)
 					@set(x,y,"p")
 		@set(3,5,"N")
 

			console.log piece.join(' ')

	importFEN: (str) ->
		x = y = 6

		# first we fill the board
		while y >= -1
			next = str[-1]
			str = str[0...]

			# if we finished this rank go to the next one
			if x < -1
				x = 6
				y--
				continue


	setup: (type) ->
		switch type
			when "classic"
				@importFEN( "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1" )

	getMoves: (x, y) ->
		(@get(x,y)).getMoves(x, y, @board)
