* @return o or 1 depending on if diagonal neighbor
*/
private int checkDiagonalNeighbor( int r, int c, int rowOffset, int colOffset,
boolean friendPlayer1, boolean sameSideOnly,
GoBoardPositionList stack ) {
GoBoardPosition nbr = (GoBoardPosition) board_.getPosition(r + rowOffset, c + colOffset);
if (nbr.isUnoccupied()) {
return 0;
}
// determine the side we are checking for (one or the other)
boolean sideTest = sameSideOnly ? friendPlayer1 : !friendPlayer1;
if ( (nbr.getPiece().isOwnedByPlayer1() == sideTest) && !nbr.isVisited()) {
BoardPosition diag1 = board_.getPosition(r + rowOffset, c);
BoardPosition diag2 = board_.getPosition(r, c + colOffset);
if (!isDiagonalCut(diag1, diag2, sideTest) ) {
stack.add( 0, nbr );
return 1;