sub whereami {
my $self = shift;
$self->{parent}->locate($self);
}
# in Parent
sub locate {
my $self = shift;
my $child = shift;
foreach my $x (0 .. $xmax) {
foreach my $y (0 .. $ymax) {
return ($x, $y) if $self->{children}[$x][$y] eq $child;
}
}
}
####
sub foobar {
my $foo = shift;
my $bar = shift;
# do stuff
}
####
sub foobar {
my $bar = shift;
my $foo = shift;
# do stuff
}
####
grep {$_->[$row]} @{$self->{children}}; # I think!