Line geometry for an N×N board. 3×3 needs three in a row; larger boards need four, which keeps 4×4 and 5×5 winnable without being trivial.
Every contiguous run of winLength cells horizontally, vertically and diagonally.