The rulebook says the following:
Number of your structures in a row (any continuous straight line is fine; only count the longest row of structures you have; rivers do not break continuity).
The last bit is obvious: rivers don't matter. The "straight line" part is in parenthesis, so I assume that it isn't as important as the "in a row", so what does that mean?
Is it any continuous grouping, or is the straight line part more important than I assume, and the structures need to be along one of the hex rows?