Lines "flow" from left to right (horizontally) or bottom to top (vertically), and all lines start out white. When two lines cross, they might switch color depending on which color they come across, as follows:
* white (h) + white (v) = black (h) + black (v)
* black (h) + black (v) = black (h) + black (v)
* white (h) + black (v) = white (h) + white (v)
* black (h) + white (v) = white (h) + white (v)