An adventure game in C++ and C, from prolog