Although your program is good, i found it coundn't resume when I pushed the 'PAUSE' button. Matlab 'paush' function can be waken up by any key, but it is just once. What's mean is that when you click one time, it's be waked up. But this doesn't continuous. So can you solve this little problem?
The wavplay error has been redeemed.
To exit, one will have to stop the execution of the game by going to MATLAB command line and typing CTRL+C.
This is my first attempt at such an endeavour and I haven't seen other submissions in this regard.