Help me to port this NetHack function to Python please!
Hi, I am trying to write a Python function which returns the same moon phase value as in the game NetHack. This is found in hacklib.c. I have tried to simply copy the corresponding function from the NetHack code but I don't believe I am getting the correct results. The function which I have written is phase_of_the_moon(). The functio...