public GameController()
 {
     Dice = new Dice();
     Players = new List<Player>();
     Board = new Board();
     InitializeResourceLookup();
     InitializeResourceDeck();
     InitializeDevelopmentDeck();
 }
        public GameController(List<Player> players)
        {
            Dice = new Dice();
            Players = players;
            CurrentPlayer = Players[0];
            Board = new Board();
            InitializeResourceLookup();
            InitializeResourceDeck();
            InitializeDevelopmentDeck();

            CurrentPlayer = PickFirstPlayer();
        }
Exemple #3
0
 //Purpose: To draw the dice on the screen that the player has rolled
 //Requirement 4.4.0
 private void DrawDice(Dice dice)
 {
     if (drawDice)
     {
         int[] diceRoll = dice.getDiceRoll();
         Texture2D Die = hudDiceOne;
         for (int i = 1; i < 3; i++)
         {
             int die;
             if (i == 1)
                 die = diceRoll[0];
             else
                 die = diceRoll[1];
             switch (die)
             {
                 case 1:
                     {
                         Die = hudDiceOne;
                         break;
                     }
                 case 2:
                     {
                         Die = hudDiceTwo;
                         break;
                     }
                 case 3:
                     {
                         Die = hudDiceThree;
                         break;
                     }
                 case 4:
                     {
                         Die = hudDiceFour;
                         break;
                     }
                 case 5:
                     {
                         Die = hudDiceFive;
                         break;
                     }
                 case 6:
                     {
                         Die = hudDiceSix;
                         break;
                     }
             }
             //Draw die one
             if (i == 1)
             {
                 OurGame.SpriteBatch.Draw(Die,
                     new Rectangle(screenWidth / 8 - 40,
                     screenHeight - (190 + TitleSafeArea.Bottom),
                     hudDiceOne.Width,
                     hudDiceOne.Height),
                     new Rectangle(0, 0, hudDiceOne.Width, hudDiceOne.Height),
                     Color.White);
             }
             else             //draw die two
             {
                 OurGame.SpriteBatch.Draw(Die,
                     new Rectangle(screenWidth / 6 - 40,
                     screenHeight - (190 + TitleSafeArea.Bottom),
                     hudDiceOne.Width,
                     hudDiceOne.Height),
                     new Rectangle(0, 0, hudDiceOne.Width, hudDiceOne.Height),
                     Color.White);
             }
         }
     }
 }