Program that solves moon puzzle and chess puzzle