From the book Ancient Egypt in Lace and Color.
A long time ago, the moon was as bright as the sun, and it did not change from night to night. The moon god Khonsu was responsible for holding the moon up over Egypt. Every night he travelled with the moon across the sky. But even the bright moonlight had limits, and there were shadows that the light could not reach. Khonsu wanted to know what secrets were hiding in the shadows.
Thoth could see into the hearts and souls of all men and knew all their secrets. So Khonsu approached him and challenged him to a game of Senet. Khonsu asked Thoth to wager his secret knowledge in the game. In return, Khonsu would bet part of the moon’s light.
Senet is a game of strategy, and both Khonsu and Thoth were very skilled players. The game went on for many hours, but in the end Thoth prevailed and defeated Khonsu.
Ever since then, Khonsu has not been able to show all the light of the moon. Every night, it gets a little brighter, until it reaches its full light, but then it grows dimmer again, as the light transfers to Thoth.