You will write a game that is inspired by the classic board game Risk. I encourage you to come up with a creative variation on the Risk theme, or implement a variation that has already been created (we love Game of Thrones Risk – I recommend you stick to “skirmish” mode). You may, of course, implement classic Risk itself.
Be sure to follow the instructions in the Canvas assignment announcements!
For your reference, here’s a rough outline of the rules of Risk.
Risk is a turn-based strategy game played by 2 - 6 players controlling armies on a board containing 42 territories. The object of the game is to conquer every territory on the board.
Each player chooses a "color" and gets an initial allotment of armies of that color according to the number of players:
On each turn a player does three things:
At the beginning of a player's turn the player receives:
(There are also cards in Risk, but we'll ignore them to simplify the game for our purposes.)
A player can choose to attack a neighboring territory occupied by another player. To attack a territory, the attacking territory must have at least one more army than the defending territory, and the territories must be adjacent. The attack proceeds as follows:
At the end of a player's turn, the player may move armies from one territory to an adjacent territory, leaving behind at least one army (each territory must be occupied by at least one army).
A player loses by having every army vanquished, thus occupying no territorries on the board. A player wins by occupying every territory on the board.
The software will implement the (simplified) game of Risk described above in a web-based system. Each user of the software will control one or more players, and each user will use the same computer in a single browser window. Players are individually identified. Users are not individually identified.
Users of the system will be comfortable using interactive browser-based software, be able to read English language text, and understand simple diagrams and pictures as might be found in popular magazines or newspapers.
Note that these requirements are not comprehensive and are written using terminology from Risk. You may add your own requirements and substitute your own game concepts and rules as long as the game has the following characteristics:
R1: The software shall provide a means for 3-6 players to join a game by entering their names.
R2: The software shall randomly select an order for turns among the players in a game and display this order to the users. This turn order will remain in effect throughout the game.
R3: The software shall assign to each player some number of "armies" at the beginning of the game.
R4: The software shall display to the users all the territories on the "board" throughout the game.
R5: The software shall display to the users all the armies on all the territories on the board throughout the game.
R6: The software shall provide a means for each player to choose, or be assigned initial territories occupied by the armies given in the player's initial allottment (R3).
R7: The software shall provide notification of each player's turn according to the order determined in setup (R2).
For each player's turn:
R8: At the beginning of a player's turn, the software shall calculate the number of armies to be added to the player's total and display this number to the player.
R9: The software shall provide a means for the player to place the armies received on a turn on territories of the player's choosing, provided the player already occupies the territories.
R10: The software shall require the player to place all of the newly received armies before proceeding with the turn.
R11: The software shall provide a means for the player to choose to attack.
If the player chooses to attack:
R12: The software shall provide a means for the player to choose which territory to attack from, and which territory to attack.
R13: The software shall provide a means for the attacking player to choose how many dice to roll in the attack, up to 3. The software should not allow the player to choose to roll a number of dice that is more than one less than the number of armies on the attacking territory.
R14: The software shall provide a means for the defending player to choose how many dice to roll, up to 2. The software should not allow the defending player to choose to roll a number of dice greater thatn the number of armies on the defending territory.
R15: After the attacking and defending players have both chosen their numbers of dice to roll, the software shall "roll" the dice, show the results to the users, calculate the resulting numbers of armies on each territory, and display the resulting numbers of armies on the respective territories.
R16: The software shall provide a means for the attacking player to choose to continue to attack.
R17: The software shall provide a means for the player to fortify a territory with armies from an adjacent territory. At least one army must remain on all territories.
R18: If the last attack resulted in the attacking player occupying every territory on the board, the software shall recognize that the gae is over, report the attacking player as the winner, and offer to start a new game.
You must meet the constraints listed above. You may earn bonus points in the project category as follows: