Games-Nonogram

 view release on metacpan or  search on metacpan

lib/Games/Nonogram/Clue.pm  view on Meta::CPAN

  foreach my $block ( $self->blocks ) {
    if ( $block->might_have( $id ) ) {
      return -1 if $hit; # multiple candidates; cannot decide

      $hit = $block;
    }
  }
  return $hit ? $hit : 0;
}

sub update {
  my ($self, $mode) = @_;

  unless ( $mode ) {
    $self->_update_basic;
  }
  elsif ( $mode eq 'more' ) {
    $self->_update_more;
  }

  foreach my $ct ( 1 .. $self->size ) {

lib/Games/Nonogram/Grid.pm  view on Meta::CPAN

    $str .= "\n";

    foreach my $col ( $self->cols ) {
      $str .= sprintf "%s\n", $col->as_string;
    }
  }

  defined wantarray ? return $str : print $str;
}

sub update {
  my ($self, $mode) = @_;

  $self->log( 'updating' );

  $self->is_dirty( 0 );
  foreach my $row ( 1 .. $self->{height} ) {
    my $clue = $self->row( $row );

    next if $clue->is_done && !$clue->line->is_dirty;

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

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