A medieval castle: why and how?