X-Git-Url: https://git.realraum.at/?a=blobdiff_plain;f=dart%2FDart.pm;h=7adec4a41fc72980caee0df5cdf1957f6ba5f4fb;hb=da910f7d4d8727251856247e0653d18be917a425;hp=cb654bd3e11abe26f2b1860b0cc9f8156022d437;hpb=6c140bc27bbb045246955b57c5c4940f651606c7;p=svn42.git diff --git a/dart/Dart.pm b/dart/Dart.pm index cb654bd..7adec4a 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 25/; + 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;