That is some seriously horrific code. And the basic idea(trying to have the network predict a move directly in algebraic notation using three outputs, x, y, and piece type) is pretty terrible also.
One part that really sticks out as do-not-copy is where he tried to one-hot encode the column with a=no bits set, b=first bit set, c=second bit set instead of a=first bit, b=second bit, c=third bit. Overall, you would be better off not learning from that.