Offloaded gridworld functions to a separate class.