Store* City::robStore(int x, int y){ REQUIRE(properlyInitialized(), "Object 'City' was not properly properlyInitializedialized when calling robStore(int, int)"); CityObjects* ptr; ptr = matrix.getObject(x, y); Store* storeptr = dynamic_cast<Store*>(ptr); if (storeptr->getState() != normal || storeptr->getType() != store){ return NULL; } storeptr->setState(beingrobbed); ENSURE(storeptr->getState() == beingrobbed, "setFire() did not correctly set fire to the given house."); return storeptr; }