Changed code in board to use functions for getting position colors, block pointers, and group pointers, instead of accessing directly.
Added code to add border value into group when two semi-connections are found to the same edge that do not belong to the group.