 	# fills an 8x8 board array
 	visual: ->
 		for y in [0..7]
-			for x in [-1..7]
+			for x in [0..7]
 				@get(x,y).symbol
 
 	# draw the board to the console

			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



	get: (pos...) ->
		# convert if we are in algebraic notation
		if pos.length == 1
			pos = anToxy pos[0]
		x = pos[0]
		y = pos[1]

