King And Castles

A powerful king  had eccentric ideas on the subject of military architecture. 
He held that there was great strength and economy in symmetrical forms, and always cited the example of the bees, who construct their combs in perfect hexagonal cells, to prove that he had nature to support him. 
He resolved to build ten new castles in his country all to be connected by fortified walls, which should form five lines with four castles in every line. 
The royal architect presented his preliminary plan in the form I have shown. 
But the monarch pointed out that every castle could be approached from the outside, and commanded that the plan should be so modified that as many castles as possible should be free from attack from the outside, and could only be reached by crossing the fortified walls. 
The architect replied that he thought it impossible so to arrange them that even one castle, which the king proposed to use as a royal residence, could be so protected, but his majesty soon enlightened him by pointing out how it might be done. 

How would you have built the ten castles and fortifications so as best to fulfil the king's requirements? 
Remember that they must form five straight lines with four castles in every line.

See answer

Math Genius