Three missionaries and three cannibles are trapped on an island with a small boat. Write a program that transfers all 6 people to shore using the boat.
Be careful. The cannibles cannot outnumber the missionairies on the island, in the boat, or on shore, they will eat them and the game ends. Also if you try to put more than 3 people into the boat, it sinks and the game is over. And of course, there must be someone to row the boat in the boat.
If the player tries to put more people than possible into the boat, the game ends. For example, if there are currently 3 missionairies and two cannibles on the island and the player wants to put 3 cannibles into the boat, we have problems, so end the game.
For each crossing prompt the player for the # of missionairies and the number of cannibles to put into the boat. then perform the validiity checks to make sure that all is good in the south pacific. Print out messages explaining that the player won or why the player lost.
void draw_status(int islandM, int islandC, int shoreM, int shoreC,int NoOfCrossings)
which will display the number of missionairies and cannibals on the island and the shore as well as teh position of the boat based on the value of NoOfCrossings: even means the boat is at the island, odd means the boat is at the shore.
Possilbe algorithm:
setup stuff
while still can play game
loadboat
based on to island or to shore,
check for issues'
if everything ok
cross
draw_status
end_while
explain why game ended
## Deliverables
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):
a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.
b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.
3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
## Platform
C++ programming is what is needed to run the program.