Assert (and if necessary repair) the white/black brightness invariant
Source:R/fct_orientation.R
fix_template_colour_swap.RdA template library learned from a board whose orientation was misjudged has every white template built from a black piece and vice versa. That is catastrophic and silent, so check it explicitly: across the six piece kinds, the white templates must be brighter than the black ones.
Arguments
- lib
A template library from
build_from_start_position().