Pushing the following keys has the listed effect:
n.....Starts a new game in the middle of any game.
p.....Pauses/Unpauses game play.
s.....Starts the new game (alternative to pushing the start button).
To move the piece, use the arrow keys.
The up arrows rotates a piece clockwise, shift+up, counter clockwise.
Clicking on the preview window hides/unhides the preview (next piece).
Click on the level (1) before starting a game to choose start level. If the first level is too slow, try starting out at a higher level, up to 9. The desired starting level may also be passed in as an argument when first calling the game. For example,
starts the game at level 7.
Certain alterations should be easy for experienced MATLAB users, such as altering the number of lines required to advance to the next level and the acceleration rate level-to-level, as the code is well-commented. If it is desired to change these things but too difficult, feel free to contact me for assistance.
See the help in the file for more important information. If this game is found to have bugs, please contact me via email with a detailed message.
Matt Fig (2021). MATLABTETRIS (https://www.mathworks.com/matlabcentral/fileexchange/34513-matlabtetris), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!