In the manner or style of a castle; in a castle-like way; arranged like a castle.
From castle with the suffix -wise (Old English wis, meaning 'manner, way'). The -wise suffix appears in words like likewise, clockwise, and lengthwise.
The -wise suffix was hugely productive in English for creating adverbs—we still say 'clockwise' and 'likewise' today, but castlewise is archaic because we stopped describing things in 'castle manner' after medieval times!
Complete word intelligence in one call. Free tier — 50 lookups/day.