Acme-BloodType

 view release on metacpan or  search on metacpan

lib/Acme/BloodType.pm  view on Meta::CPAN

=cut

sub get_genotype {
	my ($self) = @_;
	return $self->{'genotype'};
}

=head2 $bt1->cross($bt2)

"Mate" one person with the other, producing a result chosen randomly in the
style of Mendel.

=cut

sub cross {
	my ($self, $other) = @_;

	die "Uh?" unless $other->isa(__PACKAGE__);

	my $from_self = substr $self->get_genotype, int rand 2, 1;
	my $from_other = substr $other->get_genotype, int rand 2, 1;



( run in 0.679 second using v1.01-cache-2.11-cpan-c966e8aa7e8 )