Castles developed as a defense against armies.