Pygame opening and closing immediately after running

I’m writing a simple game of gomoku with pygame, but when I run the program the pygame windows opens and exits immediately after running. I know it’s something wrong with the program itself as I tested pygame with an online pygame program and it worked fine, but I’m not sure which part itself is wrong.… Read More Pygame opening and closing immediately after running