Edinburgh Castle sat up high on a green mountaintop.