Mc engine

Start of an implementation of #21. It is untested however, and when trying to generate a move it produces a stack overflow.