The 1030 Risk Game - Instructions

Make a new C++ project and unload the zip file contents into the project folder.
Add all the .cpp files to the project. 

Run the project.  When the black monitor window pops up, it will prompt for a
number to begin the generation of random numbers.  Supply any integer, then
when the world map appears, click on it so that the map becomes the active
window.  The following keys are available:

           c    - this will color code the different continents

           a    - this will show which countries are adjacent to each other.
                   One country will be red, its neighbors will be white and all
                   other countries will be gray.   If you press 'a' again, the next
                   country will shows its neighbors, etc.

                   (c and a are unavailable after a game has started.)

           g    - will cause a game to start (assuming some players have been
                    added to the game).   Each press on 'g' will push the game
                    one step further.  Generally, the game pauses at the start of
                    each player's move and after each attack.

           m -  Each country is labeled with the number of armies residing there.
                  A second smaller label shows how many armies were added to
                  that country at the start of the current move.   Pressing m will
                  show or hide these smaller labels.

           <esc>   The escape key will stop the program.

          Clicking on a country (except for its army count label(s)) will print
          out the name of the country.

Rules of simplified Risk

           The countries are assigned to the players randomly at the start of the game.
After that, the players take turns.   At the start of each turn, a player receives a
number of armies.  The number is a minimum of 3 plus 1 for every 3 countries the
player holds plus a bonus for each continent the player completely owns.  (Bigger
continents provide bigger bonuses.)  The player places these armies on his countries
in any way she likes.  The player may then try to capture other countries by attacking
them.  When one country (invader) attacks another (defender), the winner is the one
with more armies.  (Defender wins a tie.)  If the invader wins, he first loses as many
armies as the defender had, then all of the survivors move into the conquerred country,
except for one army that stays behind.   If the defender wins,  the invader loses all
but one army and the defender loses as many armies as the invader lost.  The game
is done when only one player remains.

How to create a player for Risk

Look at the bottom of riskGame.cpp where you will find main.  In main, some
commented out code shows how players are created and added to a game.  At the
top of the file, there are #include directives for each kind of player.

A player is a subclass of Player.  It must provide definitions for the two functions
doAllocation() and doAttack().  These functions are called by the game and they
give the player a chance to place armies and attack other countries respectively.
Each player is given a pointer to the Game object and can use that pointer to
do such things as place an army or attack another country.  The public functions of
Game are all potentially useful to the player.  They allow the player to look at
the countries (including ownership and army counts), find out whether two countries
are neighboring, and make moves.  If the player tries to make an illegal move, the
game will (hopefully) spot this and decline to do it.