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; } }
public void TestXXXX_ConvertIntToScoreCategoryType() { for (int i = 1; i <= 19; i++) { ScoreCategoryType type = ScoreCategory.convert(i); Assert.AreEqual((int)type, i); } }
public Move(Player player, ScoreCategoryType scoreCategory, List <int> diceValue) { //TODO: fill this out. }
void calculateScore(ScoreCategoryType scoreCategory, List <int> diceValue) { //TODO: calculate score based on dice value and score categories. }