c++ please
#include <cstdlib>
In this assignment you are going to explore visualizing a
grid-based Wumpus World using ASCII art. We will build this program
incrementally.
1.) You need to take as input from the user the number of rows
and columns, in that order. You also need to
check if the inputs are within the accepted range of 2 to 9
inclusive. If the row size is invalid, output an error message:
"Row size is illegal!" and similarly for the column size. For valid
sizes, you print the grid.
Each grid element consists of :
2.) You need to add the user into the grid. We will use '*' to
represent the user. The user's starting location should be random.
You will output this location in the form "User location: (i, j)",
where i is the row
and j is the column. When you display
the grid, you should output '*' in the user's
location. In this lab, we will use a fixed seed value
of 13 for the random generator.
3.) You are probably wondering what in the world is a wumpus. A
wumpus is a monster that will devour the poor user! Of course, at
the moment, Wumpus World does not actually contain a wumpus. So
let's change that! Generate a random location on the grid for the
wumpus. The user and the wumpus cannot start at the same location.
You will output this location in the form "Wumpus location: (i,
j)". For output, use 'W' to represent the wumpus' location.
4.) The last part of Wumpus World is adding in a pit. Create a
random starting location for the pit. Again, ensure that the pit,
the wumpus and the user are not starting on the same spot. You will
output this location in the form "Pit location: (i, j)". For
output, use 'o' to represent the pit.
Good luck!
c++ please #include In this assignment you are going to explore visualizing a grid-based Wumpus World using AS
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
c++ please #include In this assignment you are going to explore visualizing a grid-based Wumpus World using AS
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!