Question: HW1 For this homework assignment, we will begin building a text-based game where you wander a maze until you encounter the exit. There will be
HW1 For this homework assignment, we will begin building a text-based game where you wander a maze until you encounter the exit. There will be monsters that you may encounter, at which time, you will have to fight them and win to proceed. Losing to a monster means losing the game and starting over. Players and monsters have a certain amount of health and are able to do a certain amount of damage per hit. Fight mechanics are pretty straightforward. You take turns attacking each other (monster and player) and the first person who's health reaches 0 loses. Part 1 For this portion of the assignment, we want to think about building two functions. I want ONLY your algorithms this week. Next week, I would like you to follow your algorithms and submit the matlab code that implements your algorithms. 1) Think about how you would create a function to do the following a. It accepts at least 2 parameters: i. A size for the maze (maze should be square or NxN. ii. A value representing if you want to include monsters in the maze or not. b. It should return a complete maze with the following features: i. The maze is actually an NxN array of strings ii. "" fthat's the number 0 as a string, represents an empty space ii. "represents the players current position (should be randomly assigned) iv. "E" represents the exit (should be randomly assigned) v. "M" represents monsters (should be randomly assigned, should be between 1 and 3 monsters on map) 2) Think about how you would create a function to do the following: a. It accepts at least 1 parameter i. A conmplete maze, like the function described in #1 b. It returns a complete, possibly modified maze
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
