private boolean oneQueenPerRow() { int foundQueens; for (int i = 0; i < board.length; i++) { foundQueens = 0;//each loop is a checked row for (int j = 0; j < board.length; j++) { if (board[i][j] == QUEEN) foundQueens++; } if (foundQueens > 1) return false; } return true; }