My game has a quit button which would just close the application window and the code for that function is simply
Quit.prototype.onPress = function (event) {
window.close();
};
I wanted to add a restart button for my game which would simply refresh the window. Is there a similar code to that?