2015 Fall Computer Science I Program #5: Risk1000000 complete solutions correct answers key
- Kmgina
- Rating : 186
- Grade : A+
- Questions : 0
- Solutions : 462
- Blog : 1
- Earned : $47433.48
2015 Fall Computer Science I Program #5: Risk1000000 complete solutions correct answers key
Please Consult WebCourses for the due date/time
In the board game Risk, a group of armies will attack from one country to another. To simulate
the battle, both teams roll dice. The number of dice vary from attack to attack. To "score" the
battle, you match the highest roll of the attacker with the highest roll of the defender. If the
attacker's roll is greater than the defender's roll, then the defender loses an army. Otherwise, the
attacker loses an army. The comparisons continue, between the attacker's second highest roll and
the defender's second highest roll.
Recently, a new game, Risk1000000, similar to Risk, has been released that allows for megabattles
of up to 1,000,000 armies versus 1,000,000 armies. Also, rather than simulating a battle with a
die roll, an army's strength can be any number from 1 to a billion (instead of 1 through 6 for a die
roll). One final difference in Risk1000000 is that it gives the defenders an extra advantage. Instead
of lining up the highest attacking die with the highest defending die and so forth, the attacker
must position his armies for each battle and show this information to the defender. The defender
can then choose any ordering of her armies.
To see the difference, let's consider an example from regular Risk and a couple examples from
Risk1000000. In the original game Risk, if an attacker with two armies rolls a 6 and 3, while a
defender rolls a 5 and a 2, we must match the two maximum rolls (6 versus 5) and the two
minimum rolls (3 verses 2), which results in the defender losing two armies.
If we were to have the same situation in Risk1000000, the defender would see that the attacker has
6 for its first army and 3 for his second army. The defender can then strategically place the 2 for
her first army and the 5 for her second army, resulting in the loss of one defending army and one
attacking army.
[Solved] 2015 Fall Computer Science I Program #5: Risk1000000 complete solutions correct answers key
- This solution is not purchased yet.
- Submitted On 25 Mar, 2016 01:23:15
- Kmgina
- Rating : 186
- Grade : A+
- Questions : 0
- Solutions : 462
- Blog : 1
- Earned : $47433.48