Castles developed as a defense against armed attackers.