Ejemplo n.º 1
0
    public void Init()
    {
        idea = dm.GetRandomIdea();
        SetText(idea.GetDescription());
        // TODO Based on difficulty and available symbols, choose to use some or all of them
        for (int index = 0; index < 3; index++)
        {
            UpdateSymbol(index, index < idea.genres.Length ? idea.genres[index] : Genre.None);
        }

        paperRenderer.flipX = Toolkit.CoinFlip();
    }
Ejemplo n.º 2
0
    public void TestCoinFlip()
    {
        int result = 0;

        for (int i = 0; i < 100; i++)
        {
            result += Toolkit.CoinFlip() ? 1 : 0;
        }

        // May occasionally get a false positive, but more interations = zzzzzzz
        Assert.Greater(result, 10);
        Assert.Less(result, 90);
    }