Change game algorithm and data representation