The control logic seems to be similar to the ones used in the RGBMatrix library on Build which is also used in the RGBPongClock project