Exemplo n.º 1
0
    private void enableButton(string tag)
    {
        Player p = Controller.instance.game.currentPlayer();

        foreach (GameObject go in GameObject.FindGameObjectsWithTag(tag))
        {
            Button button = go.GetComponent <Button>();
            if (button == null)
            {
                continue;
            }
            if (tag == "category")
            {
                try
                {
                    ScoreCategoryType sc = (ScoreCategoryType)Enum.Parse(typeof(ScoreCategoryType), go.name);
                    if (p.getScore(sc) != -1)
                    {
                        continue;
                    }
                }
                catch (Exception e)
                {
                    // Blank block
                }
            }
            button.interactable = true;
        }
    }
Exemplo n.º 2
0
 public void TestXXXX_ConvertIntToScoreCategoryType()
 {
     for (int i = 1; i <= 19; i++)
     {
         ScoreCategoryType type = ScoreCategory.convert(i);
         Assert.AreEqual((int)type, i);
     }
 }
Exemplo n.º 3
0
 public Move(Player player, ScoreCategoryType scoreCategory, List <int> diceValue)
 {
     //TODO: fill this out.
 }
Exemplo n.º 4
0
 void calculateScore(ScoreCategoryType scoreCategory, List <int> diceValue)
 {
     //TODO: calculate score based on dice value and score categories.
 }