NetHack 2.2a/dogmove.c