Unzip the 'Snake.zip' and run the game.m file. The game controls are present on the GUI screen that comes up and are self explanatory, although small annotations have been added for easier grasp.
Hope you enjoy.
A better version with subtle scoring methods and riskier play will be uploaded in time.
how do i download this code??
any body can help me ?
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 game is designed through the application of mild image processing.
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.
i don't know how to exit the game?can you tell me?
Perhaps you can explain how this is better/worse/different than previous snake-game submissions:
??? Error using ==> wavplay at 36
WAVPLAY is only for use with Windows machines.
Use a simple check:
if ispc; wavplay...;end
So those of us without windows don't get an error every time we get the food.
will not give error on Linux.
View the winning live scripts from faculty and students who participated in the recent challenge.Learn more
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.