private void findNextLegalMove() {
        nextLegalMove = null;
        
        while (boardIterator.hasNext()) {
            BoardSquare sq = boardIterator.next();
            
            BoardCardinalIterator it =
                    new BoardCardinalIterator(state.getBoard(), sq.getRow(), sq.getColumn());
            
            boolean ok = false;
            
            if (sq.getPlayer() != Player.NONE) { continue; }

            for (BoardSquare t : it) {
                if (t.getRow() == sq.getRow() && t.getColumn() == sq.getColumn()) {
                    ok = false;
                    continue;
                    
                } else if (t.getPlayer() == state.getOpponentPlayer()) {
                    ok = true;
                    
                } else if (t.getPlayer() == state.getCurrentPlayer() && ok) {
                    nextLegalMove = sq;
                    return;
                    
                } else {
                    it.advanceCardinal();
                }
            }
        }
    }