Question: write a matlab script for the following 4) Write a script that will simulate playing the game. The script should at least do the following
write a matlab script for the following
4) Write a script that will simulate playing the game. The script should at least do the following things: a. Should allow the user to replay the game as many times as they like (without having to rerun the script) - while loop b. Proide a default value for the player stats variable, but it should ALSO ask the user ifthey d like to enter custom stats and use that instead for player health and c. Ask the user how large they would like to make the "maze and use that when d Ask the user how many monsters they would like and use that value when they e. Provide two "ways" to play the game, where the user gets to choose which "style damage they create the maze create the maze they want i One way should be an auto-play feature, where the game completely plays itself unless the user has to enter a number for a monster fight The second way should prompt the user EACH time a SINGLE move has been made, to ask whether or not they are ready to continue ii TIPS: Here is an example of how you might simulate "Playing" the game in the script. This is not a complete example, it is only meant to illustrate how to use the functions that you have created. create mazefvst algorithm random move second algorithn player [5 5] monsters mcreate maze(maze size, monster maze, player, game_over] random movemaze, player) Keep repeating statement above until game over variable indicates that game is over
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
