Description
Add an integer data member to the Player class that keeps track of the player’s amount of gold. After each battle, generate a random gold reward that the player receives, in addition to the experience point award. It would make sense for harder enemies (ogres, Orc lords) to provide a larger gold reward then orcs and goblins. Be sure to also modify the Player : : viewStats( ) method to display the current amount of gold the player owns.
Explanation & Answer
Your code is done. You did not provide the class Player. So I test implemented in the following way:#include <iostream>#inclu...
Review
Review
24/7 Homework Help
Stuck on a homework question? Our verified tutors can answer all questions, from basic math to advanced rocket science!
Similar Content
Related Tags
The Handmaids Tale
by Margaret Atwood
How to Win Friends and Influence People
by Dale Carnegie
The Second Sex
by Simone de Beauvoir
Beowulf
by Anonymous Anglo-Saxon poet
Heart of Darkness
by Joseph Conrad
The Splendid and The Vile
by Erik Larson
Uncle Tom's Cabin
by Harriet Beecher Stowe
Notes from Underground
by Fyodor Dostoyevsky
Dune
by Frank Herbert