Game-LevelMap

 view release on metacpan or  search on metacpan

lib/Game/LevelMap.pm  view on Meta::CPAN

    my ( $col, $row ) = map int, @_;
    my $lm = $self->level;
    my $s  = '';
    for my $rowref ( $lm->@* ) {
        $s .= "\e[" . $row++ . ';' . $col . 'H' . join( '', $rowref->@* );
    }
    print $s;
    return $self;
}

sub update_terminal {
    my $self = $_[0];
    my ( $col, $row ) = map int, @_[ 1 .. 2 ];
    my $lm = $self->level;
    my $s  = '';
    for my $point ( @_[ 3 .. $#_ ] ) {
        $s .= "\e["
          . ( $row + $point->[1] ) . ';'
          . ( $col + $point->[0] ) . 'H'
          . $lm->[ $point->[1] ][ $point->[0] ];
    }

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.364 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )