a little refactoring before checkmate detection, gotta put the girls to bed