Added constructor, only generating map when no game object is given.