Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
this is a class method
  • Loading branch information
doy committed Jan 2, 2010
1 parent 595608e commit 6fc0df1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/TAEB/Action/Eat.pm
Expand Up @@ -70,15 +70,15 @@ sub done {
}

sub edible_items {
my $self = shift;
my $class = shift;

return grep { $self->can_eat($_) }
$self->starting_tile->items,
return grep { $class->can_eat($_) }
TAEB->current_tile->items,
TAEB->inventory;
}

sub can_eat {
my $self = shift;
my $class = shift;
my $item = shift;

return 0 unless $item->type eq 'food';
Expand Down

0 comments on commit 6fc0df1

Please sign in to comment.