We're implementing Dots and Boxes to logic circuits and the we would like to automate the process of changing turns. If you know the game, the game changes turn when one move doesn't score a point or form two or more boxes. I was able to create overlapping XOR gates that alternates from high to low without considering the score. And also a set of latches which turns high when a box (score) or two is formed. My question is, how can I implement the alternating turn in this game? Note that my set of latches which saves the state isn't a pulse but a constant output from combinatoric circuit. So basically, I want my output to toggle when a turn is moved but a score is not formed, and to latch when a turn is moved and a score is formed.