1) All 10 castles should be connected with 5 straight walls.
2) Each wall must have at least 4 castles connected.
3) At least 1 castle must be protected by the walls.
What you see in the attached picture was the best the architect could propose.
Can you find a better way to build the castles and wall?