Tag: nethack

如何从Node.js连接到nethack?

我刚刚开始了一个游戏nethack的AI机器人,我不能绕过源代码中的“人工检查”。 我正在谈论的代码段是nethack/sys/unix/unixunix.c : #ifdef TTY_GRAPHICS /* idea from rpick%ucqais@uccba.uc.edu * prevent automated rerolling of characters * test input (fd0) so that tee'ing output to get a screen dump still * works * also incidentally prevents development of any hack-o-matic programs */ /* added check for window-system type -dlc */ if (!strcmp(windowprocs.name, "tty")) if (!isatty(0)) error("You […]