M
Marek
Hello all!
I don't want to abuse this group. I know, that you expect everybody to
give a solution first, when asking for help. I am afraid, that A.
Sinan Unur will pop up and will shout on me ... So forgive me, I try
nevertheless ...
I have a friend who is claiming to have the hundred percent working
roulette system. I said, that there is no such kind of system, but I
promised him to program it in Perl, just to learn this language with
an interesting project. So please don't laugh at me. I don't believe
in such childish ideas ...
I promised to keep his "system" secret. So don't tell it to
anybody But his "system" is so silly, that I unveil it to you
nevertheless
If there is a double number in a frame up to $five, play this number
$five times, just after the double number appeared. (The frame and the
number of bets are variables). If there comes this double number in
the coming five numbers:
$bet*35
if not
$stake-$bet
and see whether the double number comes the next game ...
Already the "rolling frame" was over my head. sln in this group
suggested the following code for it. I fired up the debugger, just to
study how this fantastic code is working. But I am unable to implement
the roulette system in this rolling frame. Would somebody be so kind
and help me with this? Perhaps even offlist, if I am bothering this
group?
Thank you in advance
marek
*****sln code for the rolling frame:
#!/usr/bin/perl
use warnings;
use strict;
# Variables that control buffer manipulation ...
my %Lines; # Line buffer, up to $frame lines: line => number.
my %Nums; # Number buffer, less than or equal to $frame:
number => [line,line,line]
my $Frame = 20; # Frame size, can be many times larger than Subframe
my $line = 0; # "line" counter.
# Virtual frame variable (used for rampdown and data printing)
my $vframe = $Frame;
# Variables to control number matching ...
my $rampup = 1; # 1 = process frame before it fills (no match,
for debug only), 0 = wait for full frame
my $rampdown = 0; # 1 = process last full frame until its empty
(RECOMMENDED), 0 = do not process last frame
my $subframe = 5; # Subframe size to check for number after double
(can be 1 .. # for different effects)
my $suboffset= 2; # Suboffset from 'double' where Subframe starts,
'double' is on Frame boundry (0 .. # for effects)
my $firstdouble = 1; # 1 = force first sequential double found (22)
22222
# 0 = force last double found 22222(22), offset
should be greater than 2
# Misc ...
my ($data,$nbr,$nbr_count,$aref,$off_frame_nbr);
print <<"EOINF";
===========================
Frame size $Frame
Subframe size $subframe
Suboffset $suboffset
Rampup $rampup
Rampdown $rampdown
First double $firstdouble
===========================
EOINF
while ( defined ($data = <DATA>) || ($rampdown && keys %Lines))
{
# Get digits
if (defined $data) {
$data =~ /^\s*(\d+)\s*$/;
next if (!defined $1);
$nbr = $1;
$line++;
$Lines{ $line} = $nbr;
unshift @{$Nums{ $nbr}}, $line; # prepend line to
array
} else {
--$vframe;
$vframe = $line if ($vframe > $line);
}
if ( $rampup || ($vframe != $Frame) || keys %Lines ==
$vframe )
{
## Display/check whats in the Numbs buffer
if ( keys %Lines ) { print "\nFrame ".($line <
$vframe ? 1: $line-$vframe+1)."-$line\n" }
foreach $nbr ( sort { $a <=> $b } keys %Nums )
{
$aref = $Nums{ $nbr};
$nbr_count = @$aref;
my @ln_array = reverse @$aref;
printf "%3d: %3d times at lines (%s)\n", $nbr,
$nbr_count, join(', ', @ln_array);
#
-------------------------------------------------------------------------------------
# Check if number is seen within a subframe at
suboffset past finding its 'double'.
# Detection of 'double' is on a frame boundry
only.
# --------------
my ($cur,$prev,$offset,$check_subframe) =
(0,-1,0,1);
foreach $cur (@ln_array)
{
if ( !($check_subframe &&
$firstdouble) && $cur == ($prev + 1)) {
$offset = $prev + $suboffset;
$check_subframe = 1;
# ---
# Force detection on frame
boundry (full frame or ramp down frame).
last if (($line - $vframe +
1) != ($offset - $suboffset));
}
if ($check_subframe && $cur >= $offset
&& $cur < ($offset + $subframe) ) {
print "\t\$\$ >> Found #
($nbr) !! Sequence \@ " . ($offset - $suboffset) .
", subframe = " .
$offset ."-". ($offset + $subframe - 1) .
", line = $cur\n";
last;
}
$prev = $cur;
}
}
print "---------\n";
## Handle buffers
if ( keys %Lines == $vframe || !defined $data)
{
# Deplete line going out of frame
$off_frame_nbr = $Lines{ $line - $vframe + 1};
pop @{$Nums{ $off_frame_nbr}};
delete $Nums{ $off_frame_nbr} if (!@{$Nums
{ $off_frame_nbr}});
# Maintain Line buffer size
delete $Lines{ $line - $vframe + 1};
}
}
}
__DATA__
01.01.98
31
33
14
31
7
35
31
16
7
20
20
13
1
1
7
22
7
9
30
30
17
11
27
21
14
30
11
29
25
19
6
25
34
I don't want to abuse this group. I know, that you expect everybody to
give a solution first, when asking for help. I am afraid, that A.
Sinan Unur will pop up and will shout on me ... So forgive me, I try
nevertheless ...
I have a friend who is claiming to have the hundred percent working
roulette system. I said, that there is no such kind of system, but I
promised him to program it in Perl, just to learn this language with
an interesting project. So please don't laugh at me. I don't believe
in such childish ideas ...
I promised to keep his "system" secret. So don't tell it to
anybody But his "system" is so silly, that I unveil it to you
nevertheless
If there is a double number in a frame up to $five, play this number
$five times, just after the double number appeared. (The frame and the
number of bets are variables). If there comes this double number in
the coming five numbers:
$bet*35
if not
$stake-$bet
and see whether the double number comes the next game ...
Already the "rolling frame" was over my head. sln in this group
suggested the following code for it. I fired up the debugger, just to
study how this fantastic code is working. But I am unable to implement
the roulette system in this rolling frame. Would somebody be so kind
and help me with this? Perhaps even offlist, if I am bothering this
group?
Thank you in advance
marek
*****sln code for the rolling frame:
#!/usr/bin/perl
use warnings;
use strict;
# Variables that control buffer manipulation ...
my %Lines; # Line buffer, up to $frame lines: line => number.
my %Nums; # Number buffer, less than or equal to $frame:
number => [line,line,line]
my $Frame = 20; # Frame size, can be many times larger than Subframe
my $line = 0; # "line" counter.
# Virtual frame variable (used for rampdown and data printing)
my $vframe = $Frame;
# Variables to control number matching ...
my $rampup = 1; # 1 = process frame before it fills (no match,
for debug only), 0 = wait for full frame
my $rampdown = 0; # 1 = process last full frame until its empty
(RECOMMENDED), 0 = do not process last frame
my $subframe = 5; # Subframe size to check for number after double
(can be 1 .. # for different effects)
my $suboffset= 2; # Suboffset from 'double' where Subframe starts,
'double' is on Frame boundry (0 .. # for effects)
my $firstdouble = 1; # 1 = force first sequential double found (22)
22222
# 0 = force last double found 22222(22), offset
should be greater than 2
# Misc ...
my ($data,$nbr,$nbr_count,$aref,$off_frame_nbr);
print <<"EOINF";
===========================
Frame size $Frame
Subframe size $subframe
Suboffset $suboffset
Rampup $rampup
Rampdown $rampdown
First double $firstdouble
===========================
EOINF
while ( defined ($data = <DATA>) || ($rampdown && keys %Lines))
{
# Get digits
if (defined $data) {
$data =~ /^\s*(\d+)\s*$/;
next if (!defined $1);
$nbr = $1;
$line++;
$Lines{ $line} = $nbr;
unshift @{$Nums{ $nbr}}, $line; # prepend line to
array
} else {
--$vframe;
$vframe = $line if ($vframe > $line);
}
if ( $rampup || ($vframe != $Frame) || keys %Lines ==
$vframe )
{
## Display/check whats in the Numbs buffer
if ( keys %Lines ) { print "\nFrame ".($line <
$vframe ? 1: $line-$vframe+1)."-$line\n" }
foreach $nbr ( sort { $a <=> $b } keys %Nums )
{
$aref = $Nums{ $nbr};
$nbr_count = @$aref;
my @ln_array = reverse @$aref;
printf "%3d: %3d times at lines (%s)\n", $nbr,
$nbr_count, join(', ', @ln_array);
#
-------------------------------------------------------------------------------------
# Check if number is seen within a subframe at
suboffset past finding its 'double'.
# Detection of 'double' is on a frame boundry
only.
# --------------
my ($cur,$prev,$offset,$check_subframe) =
(0,-1,0,1);
foreach $cur (@ln_array)
{
if ( !($check_subframe &&
$firstdouble) && $cur == ($prev + 1)) {
$offset = $prev + $suboffset;
$check_subframe = 1;
# ---
# Force detection on frame
boundry (full frame or ramp down frame).
last if (($line - $vframe +
1) != ($offset - $suboffset));
}
if ($check_subframe && $cur >= $offset
&& $cur < ($offset + $subframe) ) {
print "\t\$\$ >> Found #
($nbr) !! Sequence \@ " . ($offset - $suboffset) .
", subframe = " .
$offset ."-". ($offset + $subframe - 1) .
", line = $cur\n";
last;
}
$prev = $cur;
}
}
print "---------\n";
## Handle buffers
if ( keys %Lines == $vframe || !defined $data)
{
# Deplete line going out of frame
$off_frame_nbr = $Lines{ $line - $vframe + 1};
pop @{$Nums{ $off_frame_nbr}};
delete $Nums{ $off_frame_nbr} if (!@{$Nums
{ $off_frame_nbr}});
# Maintain Line buffer size
delete $Lines{ $line - $vframe + 1};
}
}
}
__DATA__
01.01.98
31
33
14
31
7
35
31
16
7
20
20
13
1
1
7
22
7
9
30
30
17
11
27
21
14
30
11
29
25
19
6
25
34