I wanted to know how to make a while loop in a game where after the player has played the game once, the user asks them if they would like to play again.If the user enters yes the game restarts but if they say no then the game finishes.

I would like some examples please and if you could use the while true boolean method to explain please as I am having difficulty understanding this.