public void AssignPlayerColors()
    {
        //Assign color enums
        playerOneColor = (_Colors)playerOneColorIndex;
        playerTwoColor = (_Colors)playerTwoColorIndex;

        //Assign color sub-dictionaries to each player
        playerColorDictionaries[0] = colorDictionary.GetColorDictionary(playerOneColor.ToString());
        playerColorDictionaries[1] = colorDictionary.GetColorDictionary(playerTwoColor.ToString());
    }
Exemple #2
0
 public void AssignPlayerColors()
 {
     //Pick colors
     if (randomColors)
     {
         System.Random rnd = new System.Random();
         playerOneColor = (_Colors)rnd.Next(0, 8);
         playerTwoColor = playerOneColor;
         while (playerTwoColor == playerOneColor)
         {
             playerTwoColor = (_Colors)rnd.Next(0, 8);
         }
     }
     //Assign color sub-dictionaries to each player
     playerColorDictionaries[0] = colorDictionary.GetColorDictionary(playerOneColor.ToString());
     playerColorDictionaries[1] = colorDictionary.GetColorDictionary(playerTwoColor.ToString());
 }