how to return to main loop instead of function after interrupt?

Thanks Vaclav, I'm trying to understand how I can use the watchdog timer. I have never created an h file in the Arduino IDE and realized it doesn't let you save as .h. Where can I find the h files you mentioned?

The timer interrupt is not for "end of game". I have two timer interrupts that each cause a different action to occur at a random time during the game and I want to restart after the second action. There is a lot of code so it would be messy to have a lot of timing checks throughout the code. I might just use the reset pin.

Vaclav:
Please show how you can accomplish what the OP wanted (!) , not what most replies wanted, in ONE line of code as can be done using WDT.

No, I won't.

Just because a solution is short, does not mean it is good.

I would use the non-blocking technique demonstrated in blink without delay to determine whether a game had timed out, and I would implement the game as a state machine that has its state reset when the timeout expires. This is more than a single line of code change, but that's how I would do it. Having to hard reset the Arduino to end a game suggests to me that the sketch architecture is wrong.

Here is one link

http://www.nongnu.org/avr-libc/user-manual/wdt_8h_source.html

or just Google for avr\wdt.h - there are other sources.

Mine wdt.h is located in
D:\Program Files\Arduino\hardware\tools\avr\avr\include\avr
so put it in your directory structure accordingly.
It has been a while since I did it , but I recall that I did not follow the published instruction because they were incorrect.
Hope it is correct by now.
Good luck

The WDT header file you're referring to is for an AVR core, not SAM3X8E in the Arduino Due, so it gives a compiler error. Anyway, thanks for the suggestion and I'll work on it!

whatever9:
The WDT header file you're referring to is for an AVR core, not SAM3X8E in the Arduino Due, so it gives a compiler error. Anyway, thanks for the suggestion and I'll work on it!

Well, if you insist...

It's in:
Arduino\hardware\arduino\sam\system\libsam\source\