Answer to exam question to reverse sentence Reverse Sentence Recursive
Thus, as they continue to play the game, the players may develop a large set of warriors.
Play is as follows: select two warriors and have them fight. The game will print who wins and who looses. The winner gets his strength increased by one and his score increased by 10 (you may choose to give him more points if he beats a stronger opponent) , the looser gets his strength decreased by two. Also, by some somewhat random factor, loosers will loose weapons and winners gain, though sometimes this will be reversed (randomly). Loosers may also loose limbs! The program will compute who wins and who looses a given battle by comparing the relative strengths, weaponry, number of limbs and type of warrior. Those with higher numbers will usually win, but not always (use a weighted random factor). Print who has the top 5 high scores.