Apparently working code but takes forever to solve a game. Needs a new approach.