public int[] GetSpin(int diceType) { int[] result = new int[2] { 0, 0 }; Dice d = new Dice(); d.Init((DiceTypes)diceType); BasicDiceSide roll = d.DiceRoll; result[0] = (int)roll.M_type; result[1] = roll.M_val; return result; }
public static int[] GetDiceTypeCompersionStatisics(DiceTypes firstType, DiceTypes secondType) { int[] retVal = new int[3]{0, 0, 0}; Dice firstDice = new Dice(); firstDice.Init(firstType); Dice secondDice = new Dice(); secondDice.Init(secondType); for (int i = 0; i < 6; i++ ) { BasicDiceSide sideFromFirstDice = firstDice.GetDiceRoll(i); for (int j = 0; j < 6; j++) { BasicDiceSide sideFromSecondDice = secondDice.GetDiceRoll(j); int fightResult = sideFromFirstDice.InteractWithOtherDice(sideFromSecondDice); retVal[fightResult + 1]++; } } return retVal; }
private void SetDice(Dice[] targetPlayerDiceArray, int idx, DiceTypes diceType) { Dice d = new Dice(); d.Init(diceType); targetPlayerDiceArray[idx] = d; }