So I finally finished my battleship game which is the best I can do in a console app and it is my first real program so I am extremely happy. So as I was finishing I thought, hmm, what if the person playing the game wants to play again? Even though probably no one would want to play again :p, I put the main code in a while loop so it runs again. The only problem is a bunch of variables have values in them. I could make a function to clear all of them, but I would prefer it if there were a way to restart the entire program, not just loop through the code again. If there's not I can just clear it, but if you know how to restart it, let me know. Thanks.