 	getMoves: (x,y,game) ->
 		moves = []
 		# loops over entire board, less efficient but easier to read
-		# x and y for board
-		for yb in [0..7]
-			for xb in [0..7]
-				if game.get(xb,yb).isWhite != @isWhite || game.get(xb,yb).isBlank
+		for j in [0..7]
+			for i in [0..7]
+				if game.get(i,j).isWhite != @isWhite or game.get(i,j).isBlank
 					# x and y offsets
-					xo = Math.abs (x - xb)
-					yo = Math.abs (y - yb)
+					xo = Math.abs (x - i)
+					yo = Math.abs (y - j)
 					if (xo == 1 && yo == 2) || (yo == 1 && xo == 2)
-						moves.push( [xb,yb] )
+						moves.push([i,j])
 
 		return moves
 

	whiteSymbol: "\u2656"

	getMoves: (x,y,game) ->
		# TODO: Implement castling.
		moves = []
		for j in [0..7]
			for i in [0..7]
				unless (game.get(i,j).isWhite == @isWhite and game.get(i,j) not instanceof BlankPiece)
					if game.inClearStraight(x,y,i,j)
						moves.push( [i,j] )
		return moves

		moves = []
		for j in [0..7]
			for i in [0..7]
				if game.get(i,j).isWhite != @isWhite or game.get(i,j).isBlank
					if game.inClearStraight(x,y,i,j) or game.inClearDiagonal(x,y,i,j)
						moves.push( [i,j] )
		return moves
