Code for modelling and solving combinatorial games