Sha256: c22cdf06a0cbba64c7f55feca8c4eee60f0811551b33bdd6c6986e1901f6e320

Contents?: true

Size: 241 Bytes

Versions: 35

Compression:

Stored size: 241 Bytes

Contents

unit class Robot:ver<1>;

state %record;

has Str:D $.name = self.reset-name;

method reset-name {
  $!name = ('AA'..'ZZ').roll ~ ('000'..'999').roll;
  self.reset-name if %record{$!name}:exists;
  %record{$!name} = True;
  return $!name;
}

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
trackler-2.1.0.0 tracks/perl6/exercises/robot-name/Example.pm
trackler-2.0.8.55 tracks/perl6/exercises/robot-name/Example.pm
trackler-2.0.8.54 tracks/perl6/exercises/robot-name/Example.pm
trackler-2.0.8.53 tracks/perl6/exercises/robot-name/Example.pm
trackler-2.0.8.52 tracks/perl6/exercises/robot-name/Example.pm
trackler-2.0.8.51 tracks/perl6/exercises/robot-name/Example.pm
trackler-2.0.8.50 tracks/perl6/exercises/robot-name/Example.pm
trackler-2.0.8.49 tracks/perl6/exercises/robot-name/Example.pm
trackler-2.0.8.48 tracks/perl6/exercises/robot-name/Example.pm
trackler-2.0.8.47 tracks/perl6/exercises/robot-name/Example.pm
trackler-2.0.8.46 tracks/perl6/exercises/robot-name/Example.pm
trackler-2.0.8.45 tracks/perl6/exercises/robot-name/Example.pm
trackler-2.0.8.44 tracks/perl6/exercises/robot-name/Example.pm
trackler-2.0.8.43 tracks/perl6/exercises/robot-name/Example.pm
trackler-2.0.8.42 tracks/perl6/exercises/robot-name/Example.pm
trackler-2.0.8.41 tracks/perl6/exercises/robot-name/Example.pm
trackler-2.0.8.40 tracks/perl6/exercises/robot-name/Example.pm
trackler-2.0.8.39 tracks/perl6/exercises/robot-name/Example.pm
trackler-2.0.8.38 tracks/perl6/exercises/robot-name/Example.pm
trackler-2.0.8.37 tracks/perl6/exercises/robot-name/Example.pm