Solves the problem of a die rolling through a maze using a*