コード例 #1
0
 // builds a dictionary of the number of territories owned
 public void BuildTerritoryBank(int numberOfPlayers)
 {
     landCounter   = new Dictionary <string, int> ();
     numbOfPlayers = numberOfPlayers;
     // re runs PlayerLandBank code as previous table is modified by BoardSetUp.RandomPlayer()
     boardSetUp.PlayerLandBank(numbOfPlayers);
     for (int i = 0; i < numbOfPlayers; i++)
     {
         landCounter.Add("Player" + (boardSetUp.landBank [i] [0] + 1), boardSetUp.landBank [i] [1]);
     }
     // build rank system
     territoryRank.ByTerrCount(numbOfPlayers);
 }
コード例 #2
0
    // builds a dictionary of the number of troops owned
    public void BuildTroopBank(int numberOfPlayers)
    {
        troopCounter = new Dictionary <string, int> ();
        //rebuild playerLand bank
        boardSetUp.PlayerLandBank(numberOfPlayers);

        for (int i = 0; i < numberOfPlayers; i++)
        {
            troopCounter.Add("Player" + (boardSetUp.landBank [i] [0] + 1), boardSetUp.landBank [i] [1]);
        }
        // build rank system
        troopRank.ByTroopCount();
    }