Save/Load bot data now accounts for comparison values
This commit is contained in:
parent
c172590ce4
commit
16aae180e5
|
@ -657,6 +657,16 @@
|
||||||
//
|
//
|
||||||
this.TieBreak3Numeric.Enabled = false;
|
this.TieBreak3Numeric.Enabled = false;
|
||||||
this.TieBreak3Numeric.Location = new System.Drawing.Point(417, 4);
|
this.TieBreak3Numeric.Location = new System.Drawing.Point(417, 4);
|
||||||
|
this.TieBreak3Numeric.Maximum = new decimal(new int[] {
|
||||||
|
100000,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0});
|
||||||
|
this.TieBreak3Numeric.Minimum = new decimal(new int[] {
|
||||||
|
100000,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
-2147483648});
|
||||||
this.TieBreak3Numeric.Name = "TieBreak3Numeric";
|
this.TieBreak3Numeric.Name = "TieBreak3Numeric";
|
||||||
this.TieBreak3Numeric.Size = new System.Drawing.Size(120, 20);
|
this.TieBreak3Numeric.Size = new System.Drawing.Size(120, 20);
|
||||||
this.TieBreak3Numeric.TabIndex = 1013;
|
this.TieBreak3Numeric.TabIndex = 1013;
|
||||||
|
@ -740,6 +750,16 @@
|
||||||
//
|
//
|
||||||
this.MainValueNumeric.Enabled = false;
|
this.MainValueNumeric.Enabled = false;
|
||||||
this.MainValueNumeric.Location = new System.Drawing.Point(417, 4);
|
this.MainValueNumeric.Location = new System.Drawing.Point(417, 4);
|
||||||
|
this.MainValueNumeric.Maximum = new decimal(new int[] {
|
||||||
|
100000,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0});
|
||||||
|
this.MainValueNumeric.Minimum = new decimal(new int[] {
|
||||||
|
100000,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
-2147483648});
|
||||||
this.MainValueNumeric.Name = "MainValueNumeric";
|
this.MainValueNumeric.Name = "MainValueNumeric";
|
||||||
this.MainValueNumeric.Size = new System.Drawing.Size(120, 20);
|
this.MainValueNumeric.Size = new System.Drawing.Size(120, 20);
|
||||||
this.MainValueNumeric.TabIndex = 1013;
|
this.MainValueNumeric.TabIndex = 1013;
|
||||||
|
@ -830,6 +850,16 @@
|
||||||
//
|
//
|
||||||
this.TieBreak1Numeric.Enabled = false;
|
this.TieBreak1Numeric.Enabled = false;
|
||||||
this.TieBreak1Numeric.Location = new System.Drawing.Point(417, 4);
|
this.TieBreak1Numeric.Location = new System.Drawing.Point(417, 4);
|
||||||
|
this.TieBreak1Numeric.Maximum = new decimal(new int[] {
|
||||||
|
100000,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0});
|
||||||
|
this.TieBreak1Numeric.Minimum = new decimal(new int[] {
|
||||||
|
100000,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
-2147483648});
|
||||||
this.TieBreak1Numeric.Name = "TieBreak1Numeric";
|
this.TieBreak1Numeric.Name = "TieBreak1Numeric";
|
||||||
this.TieBreak1Numeric.Size = new System.Drawing.Size(120, 20);
|
this.TieBreak1Numeric.Size = new System.Drawing.Size(120, 20);
|
||||||
this.TieBreak1Numeric.TabIndex = 1013;
|
this.TieBreak1Numeric.TabIndex = 1013;
|
||||||
|
@ -920,6 +950,16 @@
|
||||||
//
|
//
|
||||||
this.TieBreak2Numeric.Enabled = false;
|
this.TieBreak2Numeric.Enabled = false;
|
||||||
this.TieBreak2Numeric.Location = new System.Drawing.Point(417, 4);
|
this.TieBreak2Numeric.Location = new System.Drawing.Point(417, 4);
|
||||||
|
this.TieBreak2Numeric.Maximum = new decimal(new int[] {
|
||||||
|
100000,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0});
|
||||||
|
this.TieBreak2Numeric.Minimum = new decimal(new int[] {
|
||||||
|
100000,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
-2147483648});
|
||||||
this.TieBreak2Numeric.Name = "TieBreak2Numeric";
|
this.TieBreak2Numeric.Name = "TieBreak2Numeric";
|
||||||
this.TieBreak2Numeric.Size = new System.Drawing.Size(120, 20);
|
this.TieBreak2Numeric.Size = new System.Drawing.Size(120, 20);
|
||||||
this.TieBreak2Numeric.TabIndex = 1013;
|
this.TieBreak2Numeric.TabIndex = 1013;
|
||||||
|
|
|
@ -638,7 +638,15 @@ namespace BizHawk.Client.EmuHawk
|
||||||
public byte ComparisonTypeTie1 { get; set; }
|
public byte ComparisonTypeTie1 { get; set; }
|
||||||
public byte ComparisonTypeTie2 { get; set; }
|
public byte ComparisonTypeTie2 { get; set; }
|
||||||
public byte ComparisonTypeTie3 { get; set; }
|
public byte ComparisonTypeTie3 { get; set; }
|
||||||
public int FrameLength { get; set; }
|
public bool MainCompareToBest { get; set; } = true;
|
||||||
|
public bool TieBreaker1CompareToBest { get; set; } = true;
|
||||||
|
public bool TieBreaker2CompareToBest { get; set; } = true;
|
||||||
|
public bool TieBreaker3CompareToBest { get; set; } = true;
|
||||||
|
public int MainCompareToValue { get; set; }
|
||||||
|
public int TieBreaker1CompareToValue { get; set; }
|
||||||
|
public int TieBreaker2CompareToValue { get; set; }
|
||||||
|
public int TieBreaker3CompareToValue { get; set; }
|
||||||
|
public int FrameLength { get; set; }
|
||||||
public string FromSlot { get; set; }
|
public string FromSlot { get; set; }
|
||||||
public long Attempts { get; set; }
|
public long Attempts { get; set; }
|
||||||
public long Frames { get; set; }
|
public long Frames { get; set; }
|
||||||
|
@ -674,7 +682,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
_bestBotAttempt = botData.Best;
|
_bestBotAttempt = botData.Best;
|
||||||
|
|
||||||
|
|
||||||
var probabilityControls = ControlProbabilityPanel.Controls
|
var probabilityControls = ControlProbabilityPanel.Controls
|
||||||
.OfType<BotControlsRow>()
|
.OfType<BotControlsRow>()
|
||||||
.ToList();
|
.ToList();
|
||||||
|
@ -695,14 +702,42 @@ namespace BizHawk.Client.EmuHawk
|
||||||
Tie1ComparisonType = botData.ComparisonTypeTie1;
|
Tie1ComparisonType = botData.ComparisonTypeTie1;
|
||||||
Tie2ComparisonType = botData.ComparisonTypeTie2;
|
Tie2ComparisonType = botData.ComparisonTypeTie2;
|
||||||
Tie3ComparisonType = botData.ComparisonTypeTie3;
|
Tie3ComparisonType = botData.ComparisonTypeTie3;
|
||||||
}
|
|
||||||
|
MainBestRadio.Checked = botData.MainCompareToBest;
|
||||||
|
TieBreak1BestRadio.Checked = botData.TieBreaker1CompareToBest;
|
||||||
|
TieBreak2BestRadio.Checked = botData.TieBreaker2CompareToBest;
|
||||||
|
TieBreak3BestRadio.Checked = botData.TieBreaker3CompareToBest;
|
||||||
|
MainValueRadio.Checked = !botData.MainCompareToBest;
|
||||||
|
TieBreak1ValueRadio.Checked = !botData.TieBreaker1CompareToBest;
|
||||||
|
TieBreak2ValueRadio.Checked = !botData.TieBreaker2CompareToBest;
|
||||||
|
TieBreak3ValueRadio.Checked = !botData.TieBreaker3CompareToBest;
|
||||||
|
|
||||||
|
MainValueNumeric.Value = botData.MainCompareToValue;
|
||||||
|
TieBreak1Numeric.Value = botData.TieBreaker1CompareToValue;
|
||||||
|
TieBreak2Numeric.Value = botData.TieBreaker2CompareToValue;
|
||||||
|
TieBreak3Numeric.Value = botData.TieBreaker3CompareToValue;
|
||||||
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
MainComparisonType = 0;
|
MainComparisonType = 0;
|
||||||
Tie1ComparisonType = 0;
|
Tie1ComparisonType = 0;
|
||||||
Tie2ComparisonType = 0;
|
Tie2ComparisonType = 0;
|
||||||
Tie3ComparisonType = 0;
|
Tie3ComparisonType = 0;
|
||||||
}
|
|
||||||
|
MainBestRadio.Checked = true;
|
||||||
|
TieBreak1BestRadio.Checked = true;
|
||||||
|
TieBreak2BestRadio.Checked = true;
|
||||||
|
TieBreak3BestRadio.Checked = true;
|
||||||
|
MainBestRadio.Checked = false;
|
||||||
|
TieBreak1BestRadio.Checked = false;
|
||||||
|
TieBreak2BestRadio.Checked = false;
|
||||||
|
TieBreak3BestRadio.Checked = false;
|
||||||
|
|
||||||
|
MainValueNumeric.Value = 0;
|
||||||
|
TieBreak1Numeric.Value = 0;
|
||||||
|
TieBreak2Numeric.Value = 0;
|
||||||
|
TieBreak3Numeric.Value = 0;
|
||||||
|
}
|
||||||
FrameLength = botData.FrameLength;
|
FrameLength = botData.FrameLength;
|
||||||
FromSlot = botData.FromSlot;
|
FromSlot = botData.FromSlot;
|
||||||
Attempts = botData.Attempts;
|
Attempts = botData.Attempts;
|
||||||
|
@ -744,6 +779,14 @@ namespace BizHawk.Client.EmuHawk
|
||||||
ComparisonTypeTie1 = Tie1ComparisonType,
|
ComparisonTypeTie1 = Tie1ComparisonType,
|
||||||
ComparisonTypeTie2 = Tie2ComparisonType,
|
ComparisonTypeTie2 = Tie2ComparisonType,
|
||||||
ComparisonTypeTie3 = Tie3ComparisonType,
|
ComparisonTypeTie3 = Tie3ComparisonType,
|
||||||
|
MainCompareToBest = MainBestRadio.Checked,
|
||||||
|
TieBreaker1CompareToBest = TieBreak1BestRadio.Checked,
|
||||||
|
TieBreaker2CompareToBest = TieBreak2BestRadio.Checked,
|
||||||
|
TieBreaker3CompareToBest = TieBreak3BestRadio.Checked,
|
||||||
|
MainCompareToValue = (int)MainValueNumeric.Value,
|
||||||
|
TieBreaker1CompareToValue = (int)TieBreak1Numeric.Value,
|
||||||
|
TieBreaker2CompareToValue = (int)TieBreak2Numeric.Value,
|
||||||
|
TieBreaker3CompareToValue = (int)TieBreak3Numeric.Value,
|
||||||
FromSlot = FromSlot,
|
FromSlot = FromSlot,
|
||||||
FrameLength = FrameLength,
|
FrameLength = FrameLength,
|
||||||
Attempts = Attempts,
|
Attempts = Attempts,
|
||||||
|
|
Loading…
Reference in New Issue