QUOTE(1lacca @ 21 May, 2008 - 08:17 AM)

If it works than good luck to you!
heres how far ive got
// true = left // false = right
// Insert the starting data
// Left
LCol.Add(0, true);
LCol.Add(1, true);
LCol.Add(2, true);
// Right
RCol.Add(0, true);
RCol.Add(1, true);
RCol.Add(2, true);
// Set the starting bets
RedA.Text = "3";
ZeroA.Text = "0";
BlackA.Text = "3";
// Set the colours
redside = true;
}
private void RedB_Click(object sender, EventArgs e)
{
DoResult(redside);
FindCBets(true);
FindCBets(false);
FindZBets();
redside = !redside;
}
private void ZeroB_Click(object sender, EventArgs e)
{
//DoZero();
}
private void BlackB_Click(object sender, EventArgs e)
{
DoResult(!redside);
FindCBets(true);
FindCBets(false);
FindZBets();
redside = !redside;
}
private int FindLow(bool side)
{
if (side) // Left
{
int tempint;
int tempint2;
tempint = -1;
IDictionaryEnumerator loop1 = LCol.GetEnumerator();
while (loop1.MoveNext())
{
tempint2 = int.Parse(loop1.Key.ToString());
if (tempint2 < 2)
{
if (tempint2 + 1 > tempint)
{
findlowkey = tempint2;
tempint = tempint2 + 1;
}
}
else
{
if (tempint2 > tempint)
{
findlowkey = tempint2;
tempint = tempint2;
}
}
break;
}
return tempint;
}
else // Right
{
int tempint;
int tempint2;
tempint = -1;
IDictionaryEnumerator loop1 = RCol.GetEnumerator();
while (loop1.MoveNext())
{
tempint2 = int.Parse(loop1.Key.ToString());
if (tempint2 < 2)
{
if (tempint2 + 1 < tempint)
{
findlowkey = tempint2;
tempint = tempint2 + 1;
}
}
else
{
if (tempint2 < tempint)
{
findlowkey = tempint2;
tempint = tempint2;
}
}
break;
}
return tempint;
}
}
private int FindHigh(bool side)
{
if (side) // Left
{
int tempint;
int tempint2;
tempint = -1;
IDictionaryEnumerator loop1 = LCol.GetEnumerator();
while (loop1.MoveNext())
{
tempint2 = int.Parse(loop1.Key.ToString());
if (tempint2 < 2)
{
if (tempint2 + 1 > tempint)
{
findhighkey = tempint2;
tempint = tempint2 + 1;
}
}
else
{
if (tempint2 > tempint)
{
findhighkey = tempint2;
tempint = tempint2;
}
}
break;
}
return tempint;
}
else // Right
{
int tempint;
int tempint2;
tempint = -1;
IDictionaryEnumerator loop1 = RCol.GetEnumerator();
while (loop1.MoveNext())
{
tempint2 = int.Parse(loop1.Key.ToString());
if (tempint2 < 2)
{
if (tempint2 + 1 > tempint)
{
findhighkey = tempint2;
tempint = tempint2 + 1;
}
}
else
{
if (tempint2 > tempint)
{
findhighkey = tempint2;
tempint = tempint2;
}
}
break;
}
return tempint;
}
}
private void FindCBets(bool side)
{
if (side) // Red
{
if (redside) // Left
{
if (LCol.Count == 1)
{
RedA.Text = FindLow(redside).ToString();
}else if(LCol.Count == 0)
{
LCol.Add(0, true);
LCol.Add(1, true);
LCol.Add(2, true);
RedA.Text = "3";
}else{
int tempint;
tempint = FindLow(side) + FindHigh(side);
RedA.Text = tempint.ToString();
}
}
else // Right
{
if (RCol.Count == 1)
{
RedA.Text = FindLow(redside).ToString();
}
else if (LCol.Count == 0)
{
RCol.Add(0, true);
RCol.Add(1, true);
RCol.Add(2, true);
RedA.Text = "3";
}
else
{
int tempint;
tempint = FindLow(redside) + FindHigh(redside);
RedA.Text = tempint.ToString();
}
}
}
else // Black
{
if (!redside) // Left
{
if (LCol.Count == 1)
{
BlackA.Text = FindLow(redside).ToString();
}
else if (LCol.Count == 0)
{
LCol.Add(0, true);
LCol.Add(1, true);
LCol.Add(2, true);
BlackA.Text = "3";
}
else
{
int tempint;
tempint = FindLow(side) + FindHigh(side);
BlackA.
cant see whats wrong but i guess lots. lol