Castles were effective defensive fortifications in the medieval era up until the development of gunpowder and cannons fully took hold. Those stone walls no longer proved able to defend against such weapons.