X-Git-Url: https://git.realraum.at/?a=blobdiff_plain;f=dart%2FDart.pm;h=d9b37954dd1272c2a89bd6a3ef494b710fc31c68;hb=0e5aa9dd0b200a8bd5d9b886debfd9b44c451b0f;hp=cb654bd3e11abe26f2b1860b0cc9f8156022d437;hpb=be36f505b0e07738a8d38d9c57c588367307b847;p=svn42.git diff --git a/dart/Dart.pm b/dart/Dart.pm index cb654bd..d9b3795 100644 --- a/dart/Dart.pm +++ b/dart/Dart.pm @@ -25,6 +25,18 @@ sub new } +sub get_color +{ + my $self=shift; + my ($mul,$zahl)=@_; + my @zahlen = qw/20 1 18 4 13 6 10 15 2 17 3 19 7 16 8 11 14 9 12 5/; + my $counter=0; + $counter++ while($zahl != shift @zahlen and @zahlen); + $mul=0 if $mul >1; + my $result = ($counter+$mul )%2; + return $result; +} + sub init { my $self=shift;