getPlayerUnits updated to check inside buildings