public void DisPlayDice10Result()
    {
        OutPutResult.text = RandomTimes + "D10 Result : ";
        int DicesResult = 0;

        for (int i = 0; i < RandomTimes; i++)
        {
            int Dice = DiceMath.Dice10();
            DicesResult       += Dice;
            OutPutResult.text += Dice + "  ";
        }

        OutPutResult.text += " = " + DicesResult;
    }
Exemplo n.º 2
0
    public int DiceRewardResult(int ExtraDice, ref string Reason)
    {
        List <int> Dices = new List <int>();

        Reason = "";
        for (int i = 0; i < 2 + ExtraDice; i++)
        {
            Dices.Add(DiceMath.Dice10());
            Reason += Dices[i] + " ";
        }

        if (Dices.Count > 2 && Dices.Where(x => x == 0).ToList().Count >= 2)
        {
            Dices.RemoveAll(x => x == 0);
            Dices.Add(0);
        }
        Dices.Sort();

        return(DiceMath.Dice100Counting(Dices[0], Dices[1]));
    }
Exemplo n.º 3
0
    public int DicePunishmentResult(int ExtraDice, ref string Reason)
    {
        List <int> Dices = new List <int>();

        Reason = "";

        for (int i = 0; i < 2 + ExtraDice; i++)
        {
            Dices.Add(DiceMath.Dice10());
            Reason += Dices[i] + " ";
        }

        Dices.Sort();

        if (!(Dices.Count >= 2 && Dices.Where(x => x == 0).ToList().Count >= 2))
        {
            Dices.Reverse();
        }

        return(DiceMath.Dice100Counting(Dices[0], Dices[1]));
    }
    public void DisPlayDicePunishmentResult()
    {
        RandomManager.instance.OutPutResult.text = "Result : ";
        List <int> Dices = new List <int>();

        for (int i = 0; i < 2 + ExtraDiceTime; i++)
        {
            Dices.Add(DiceMath.Dice10());
            RandomManager.instance.OutPutResult.text += Dices[i] + "  ";
        }

        Dices.Sort();

        if (!(Dices.Count >= 2 && Dices.Where(x => x == 0).ToList().Count >= 2))
        {
            Dices.Reverse();
        }

        RandomManager.instance.OutPutResult.text += " Worst Result : ";
        RandomManager.instance.OutPutResult.text += Dices[0] + "  " + Dices[1] + "  ";
        RandomManager.instance.OutPutResult.text += " = " + DiceMath.Dice100Counting(Dices[0], Dices[1]);
    }
    public void DisPlayDiceRewardResult()
    {
        RandomManager.instance.OutPutResult.text = "Result : ";
        List <int> Dices = new List <int>();

        for (int i = 0; i < 2 + ExtraDiceTime; i++)
        {
            Dices.Add(DiceMath.Dice10());
            RandomManager.instance.OutPutResult.text += Dices[i] + "  ";
        }

        if (Dices.Count > 2 && Dices.Where(x => x == 0).ToList().Count >= 2)
        {
            Dices.RemoveAll(x => x == 0);
            Dices.Add(0);
        }
        Dices.Sort();


        RandomManager.instance.OutPutResult.text += " Best Result : ";
        RandomManager.instance.OutPutResult.text += Dices[0] + "  " + Dices[1] + "  ";
        RandomManager.instance.OutPutResult.text += " = " + DiceMath.Dice100Counting(Dices[0], Dices[1]);
    }