he was walking down a hallway with a figured turkey carpet , but realized after a time that what he had taken for twining patterns in the rug were in fact snakes , which raised their heads , swaying , at his approach .