Dynamic win conditions for any board size with any number of boards