They replaced the old small castles on high ground protected only by wooden stockades with large central fortresses out of range behind broad moats , surrounded by solid stone ramparts and earthworks strong enough to resist cannon fire .
They replaced all of the old castles one by one with a newer model that was standard of Western castles .