HW2-Modified: modify GhostsLogic class