First implementation of optimal yield algorithm, to be integrated into the game class files