I'm trying to program a slot machine.
I have 5 rollers and 7 winning pictures. It looks like
-----|-----|-----|-----|----|
-----|-----|-----|-----|----|
-----|-----|-----|-----|----|
I get each roll 3 pictures.
foreach (var s in Walze1)
{
Random rnd = new Random();
int perCent = rnd.Next(Walze1dot7, 110);
//10 % Chance auf 7 per Walze
if (perCent <= 10)
{
Walze1dot7 = 11;
s.Text = "7";
}
//10 % Chance auf Glocke per Walze
else if (perCent <= 20 & perCent > 10)
{
s.Text = "Glocke";
}
//15 % Chance auf Melone
else if (perCent <= 35 & perCent > 20)
{
s.Text = "Melone";
}
//15 % Chance auf Pflaume
else if (perCent <= 35 & perCent > 50)
{
s.Text = "Pflaume";
}
//20 % Chance auf Orange
else if (perCent <= 70 & perCent > 50)
{
s.Text = "Orange";
}
//20 % Chance auf Zitrone
else if (perCent <= 90 & perCent > 70)
{
s.Text = "Zitrone";
}
//20 % Chance auf Kirche
else if (perCent <= 110 & perCent > 90)
{
s.Text = "Kirche";
}
}
only one 7 should be possible at one roller.
MY PROBLEM:
I winning too much... the random Code gives me too often a successful picture (min. 3 same pictures for one line).
So how can I change my Code that I will loose more often?
EDIT
It is not a duplicate because i know how to generate a random number...What i need is that i dont get to often a winning pictures (3 each line)...
Let's Say i play with 100 € on 2€ per click. after 50 click i got more than 300 € always.