Leroux: Not Magic Carpet, but a good guess, and your summary gets pretty close, if you don't take the dancing too literally. Since recently GOG also offers an advanced course, this time out in the open. ;)
Piranjade: *thinks*
Advanced course, hhhmm... a sequel. Now with outside world.
Crabs.
Evil crabs.
Dancing. Moving around in fights.
Legend of Grimrock 2.
There's even "legendary" in the name. :-D
Yup, the game I'm stuck in is Legend of Grimrock. :)
"Dancing" because it turns an old exploit in grid-based dungeon crawlers into its central gameplay mechanic and you constantly have to watch your opponents' movements and step around them to attack them from the sides. The crabs made me grin, since they walk sideways and are less predictable. The creatures that I haven't found out how to deal with yet are the fire elementals. They don't really care about dancing, they just hurl fireballs at me and run off, the spoilsports. :/