Games-Sokoban
view release on metacpan or search on metacpan
$_[1] >= 0
or Carp::croak "illegal buffer offset";
(
$_[1] % ($_[0]{w} + 1),
$_[1] / ($_[0]{w} + 1),
)
}
sub update {
my ($self) = @_;
for ($self->{data}) {
s/^\n+//;
s/\n$//;
/^[^\n]+/ or die;
$self->{w} = index $_, "\n";
$self->{h} = y/\n// + 1;
( run in 0.236 second using v1.01-cache-2.11-cpan-4d4bc49f3ae )