Implement a version of the game hunt the wumpus

Assignment Help Basic Computer Science
Reference no: EM131395225

Implement a version of the game "Hunt the Wumpus." "Hunt the Wumpus" (or just "Wump") is a simple (non-graphical) computer game originally invented by Gregory Yob. The basic premise is that a rather smelly monster lives in a dark cave consisting of connected rooms. Your job is to slay the wumpus using bow and arrow. In addition to the wumpus, the cave has two hazards: bottomless pits and giant bats. If you enter a room with a bottomless pit, it's the end of the game for you. If you enter a room with a bat, the bat picks you up and drops you into another room. If you enter the room with the wumpus or he enters yours, he eats you. When you enter a room you will be told if a hazard is nearby:

"I smell the wumpus": It's in an adjoining room.
"I feel a breeze": One of the adjoining rooms is a bottomless pit.
"I hear a bat": A giant bat is in an adjoining room.

For your convenience, rooms are numbered. Every room is connected by tunnels to three other rooms. When entering a room, you are told something like "You are in room 12; there are tunnels to rooms 1, 13, and 4; move or shoot?" Possible answers are m13 ("Move to room 13") and s13-4-3 ("Shoot an arrow through rooms 13, 4, and 3"). The range of an arrow is three rooms. At the start of the game, you have five arrows. The snag about shooting is that it wakes up the wumpus and he moves to a room adjoining the one he was in - that could be your room.

Probably the trickiest part of the exercise is to make the cave by selecting which rooms are connected with which other rooms. You'll probably want to use a random number generator (e.g., randint() from std_lib_facilities.h) to make different runs of the program use different caves and to move around the bats and the wumpus. Hint: Be sure to have a way to produce a debug output of the state of the cave.

Reference no: EM131395225

Questions Cloud

Government policy of managing the country : Briefly explain the "pros" and "cons" of a government policy of "managing"the country's foreign exchange rate as compared to a policy of letting the exchange rate "free float" according to prevailing market forces.
In which direction does the stack grow : In which direction does the stack grow: upward toward higher addresses or downward toward lower addresses? In an array on the free store, are elements with higher indices allocated at higher or lower addresses?
What will be the systems money supply : Assume a financial system has a monetary base (MB) of $25 million. The required reserves ratio is 10 percent and no leakeges are in the system. What is the size of the money multiplier (m)? What will be the systems money supply?
Alalyze full the assumption of homocedasticity : (a) Alalyze full the assumption of "homocedasticity" of a CLRM. Moreover, which are the differences wit heteroscedasticity? (b) Analyze fully the assumption of specification bias and use an example to show your intuition.
Implement a version of the game hunt the wumpus : Probably the trickiest part of the exercise is to make the cave by selecting which rooms are connected with which other rooms.
How economic principles are used in the design of the policy : Explains the policy. Gives an example where it has been used. Explains why it is has improved the problem it was meant to correct. Explains how economic principles are used in the design of the policy?
Construct argument patterns : The following arguments were abstracted from newspaper articles, editorials, and letters to the editor. Use the method presented in this section to construct argument patterns.
Organization production function : How your organization's production function is related to its marginal product of labor. How your organization's marginal product of labor is related to the value of its marginal product. How your organization's marginal prod..
What is the probability of a high one year return : What is the probability of a high one year return and what is the probability of a high five year return? What is the probability of both a high one year return and a high five year return?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Examples of some common thermocouples

Explain the principle of a thermocouple. Give two examples of some common thermocouples.

  What are the steps in negotiating a contract

What are the steps in negotiating a contract? What should the auditor look for?

  What would be the advantages of this design

What would be the advantages of this design?

  Give an algorithm to record global state

Consider a distributed system where every node has its physical clock and all physical clocks are perfectly synchronized.

  Discuss user interface characteristics

Search the Internet to find resources that discuss user interface characteristics that we can expect to see in the future, in terms of:

  Determine the heat transfer for the process

Saturated liquid water contained in a closed, rigid tank is cooled to a final state where the temperature is 50°C and the masses of saturated vapor and liquid present are 0.03 and 1999.97 kg, respectively. Determine the heat transfer for the proce..

  Expected rate of return on investment

Modigliani and Miller's Proposition 1 and 2 are contradictory. Shareholders cannot be indifferent to the use of debt when it increases the expected rate of return on their investment. Comment on this statement.

  What were some of the industry factors

Your research should lead to answers to the following questions. What were some of the challenges that RIM faced to protect its intellectual property, and how did RIM handle those challenges? What were some of the industry factors that influenced..

  Would you always get 507 votes for bush and 483 for kerry

Would you expect the sample proportion of Nader votes to vary more, less, or about the same as the sample proportion of Bush votes? Why?

  The owners of designit

The owners of DesignIT, who recently purchased 56'x36' space for their expanding business, have asked you to place a bid on a consulting job. DesignIT is a graphic arts company that, up until now, had contracted work out to temporary design services...

  Hexadecimal and binary value of the given number

What is its value in hexadecimal if the integer is converted to a 32 bit integer - Find the decimal, hexadecimal and binary value of the given number.

  Show that the second largest eigenvalue of a(a) is bounded

Show that the second largest eigenvalue of A(α) is bounded (in absolute value) by α.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd