Exemplo n.º 1
0
    void calculateNetPayi()
    {
        netPayi = 0;
        foreach (KeyValuePair <string, ResultCount> res in resultCounts)
        {
            netPayi += (res.Value.net * res.Value.occurenceCount);
        }
        variance = 0;
        List <string> keys = new List <string>(resultCounts.Keys);

        foreach (string key in keys)
        {
            ResultCount temp = resultCounts[key];

            temp.probability = (float)resultCounts[key].occurenceCount / ((float)itterations * linesPlayedEditor);
            temp.EV          = netPayi / ((float)itterations * linesPlayedEditor);
            temp.AD          = (float)resultCounts[key].net - temp.EV;
            temp.E2          = temp.AD * temp.AD;
            temp.CxF         = temp.probability * temp.E2;

            variance         += temp.CxF;
            resultCounts[key] = temp;
        }

        standardDeviation = Mathf.Sqrt(variance);
        volitility        = standardDeviation * 1.65f;
    }
Exemplo n.º 2
0
 public PersistentResultCount(ResultCount rc)
 {
     this.Filtered        = rc.Filtered;
     this.FilteredDebug   = rc.FilteredDebug;
     this.FilteredHoles   = rc.FilteredHoles;
     this.FilteredInfo    = rc.FilteredInfo;
     this.FilteredLog     = rc.FilteredLog;
     this.FilteredWarning = rc.FilteredWarning;
     this.Full            = rc.Full;
     this.FullDebug       = rc.FullDebug;
     this.FullHoles       = rc.FullHoles;
     this.FullInfo        = rc.FullInfo;
     this.FullLog         = rc.FullLog;
     this.FullWarning     = rc.FullWarning;
 }
Exemplo n.º 3
0
    void addResultCount(string name, int pay, int matches)
    {
        string      key = name + ":" + matches;
        ResultCount res = new ResultCount();

        if (resultCounts.ContainsKey(key))
        {
            res = resultCounts[key];
        }
        else
        {
            resultCounts.Add(key, res);
        }
        res.name      = name;
        res.winTotal += pay;
        res.net       = (pay / slot.betsPerLine[betPerLineEditor].value) - 1;
        res.occurenceCount++;
        res.matches       = matches;
        resultCounts[key] = res;
    }
Exemplo n.º 4
0
    public void SetPageInfo()
    {
        this.LitPageResult.Text = ResultCount.ToString();
        this.TBPageIndex.Text   = PageIndex.ToString();
        if (ResultCount % PageSize == 0)
        {
            PageCount = ResultCount / PageSize;
        }
        else
        {
            PageCount = ResultCount / PageSize + 1;
        }
        //this.LBPageFirst.Enabled = true;
        //this.LBPagePrev.Enabled = true;
        //this.LBPageNext.Enabled = true;
        //this.LBPageLast.Enabled = true;
        this.pagerFirst.CssClass = "pager-ext-first";
        this.pagerPrev.CssClass  = "pager-ext-prev";
        this.pagerNext.CssClass  = "pager-ext-next";
        this.pagerLast.CssClass  = "pager-ext-last";
        if (PageIndex == 1)
        {
            //this.LBPageFirst.Enabled = false;
            //this.LBPagePrev.Enabled = false;

            // this.LBPageFirst.Attributes.Add("onclick","return false;");
            isfirst = "false";
            this.pagerFirst.CssClass = "pager-ext-first pager-ext-firstdisabled";
            this.pagerPrev.CssClass  = "pager-ext-prev pager-ext-prevdisabled";
        }
        if (PageIndex == PageCount || PageCount == 0)
        {
            //this.LBPageNext.Enabled = false;
            //this.LBPageLast.Enabled = false;
            islast = "false";
            this.pagerNext.CssClass = "pager-ext-next pager-ext-nextdisabled";
            this.pagerLast.CssClass = "pager-ext-last pager-ext-lastdisabled";
        }
    }
Exemplo n.º 5
0
 void addResultCount(string name, int pay, int matches)
 {
     string key = name + ":" + matches;
     ResultCount res = new ResultCount();
     if (resultCounts.ContainsKey(key))
     {
         res = resultCounts[key];
     } else {
         resultCounts.Add (key, res);
     }
     res.name = name;
     res.winTotal += pay;
     res.net = (pay / slot.betsPerLine[betPerLineEditor].value) - 1;
     res.occurenceCount++;
     res.matches = matches;
     resultCounts[key] = res;
 }
Exemplo n.º 6
0
	void displayResultItem(ResultCount item)
	{
		float[] colWidth = {75,50,75,50,50,50};
		EditorGUILayout.BeginHorizontal();
		EditorGUILayout.LabelField(item.matches.ToString() + " " + item.name, EditorStyles.miniTextField, GUILayout.Width(colWidth[0]));
		EditorGUILayout.LabelField(item.occurenceCount.ToString(), EditorStyles.miniTextField, GUILayout.Width(colWidth[1]));
		EditorGUILayout.LabelField(item.winTotal.ToString(), EditorStyles.miniTextField, GUILayout.Width(colWidth[2]));
		EditorGUILayout.LabelField(((float)item.winTotal / (float)slot.edsave.returnTotalWon).ToString ("F4"), EditorStyles.miniTextField, GUILayout.Width(colWidth[3]));
		EditorGUILayout.LabelField(((float)item.occurenceCount / slot.GetComponent<SlotComputeEditor>().itterations).ToString("F4"), EditorStyles.miniTextField, GUILayout.Width(colWidth[4]));
		EditorGUILayout.LabelField(((float)item.winTotal / (float)slot.edsave.returnTotalBet).ToString ("F4"), EditorStyles.miniTextField, GUILayout.Width(colWidth[5]));
		EditorGUILayout.EndHorizontal();
	}