Creating a game board for 15-puzzle
Mostrar comentarios más antiguos
For this project, we are to make a the game 'Umpteen Puzzle' in Matlab. It is supposed to be a general function so the user can enter the dimensions of the case, and the function will return the case of that size with tiles placed in initial position. Tried starting by just doing 16 tiles in a 4x4 with one of the tiles being 0 (the blank space). Cant figure out how to do random though for 0-15 can only manually put each number in a spot. How can i use randperm or randi to generate random matrix of 0-15? And from there, I need to display it as an image to be used as the gameboard. Any help would be appreciated.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Strategy & Logic en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
