private final int gen_caps_delta(int index, int[] delta, int nDelta, boolean sliding,
			Move[] moves, int startIndex) {
		int moveIndex = startIndex;
		// Record the board's en passant square, white/black castling rights and
		// half-moves
		for (int i = 0; i < nDelta; i++) // Loop through the 8 possible deltas
		{
			// Get the index of a square one step away from the orignal square
			// by using the current delta
			int deltaIndex = index;
			deltaIndex += delta[i];

			/* Loop until out of moves, off the board or run into a piece */
			while((deltaIndex & 0x88) == 0) {
				if(boardArray[deltaIndex] == EMPTY_SQUARE) {
					if(!sliding) break;
				} else if ((boardArray[deltaIndex] * boardArray[index]) < 0){
					moves[moveIndex++].move = Move.createMove(
							boardArray[index], index, deltaIndex, boardArray[deltaIndex],
							ORDINARY_MOVE, 0);

					break;
				} else {
					break;
				}
				
				deltaIndex += delta[i];
			}
		}
		return moveIndex - startIndex;
	} // END gen_caps_delta()