Games-Sudoku-Preset

 view release on metacpan or  search on metacpan

lib/Games/Sudoku/Preset.pm  view on Meta::CPAN


# position the clickfield over the entered sudoku field
# callback of the <Enter> event
#
sub _move_clickfield {
    my ($fieldID) = shift;    # ID of button to be covered

    # ignore re-entering the active field
    # (this happens when withdrawing the clickfield)

    # Color change and popup required when returning from the bottom row,
    # so no return to caller in this case
    return
      if (     $fieldID == ( 'Cell'->activefield() || 0 )
           and $clickfield->state eq 'normal' );

    'Cell'->activefield($fieldID);
    $clickfield->withdraw;    # make clickfield invisible

    # mark the tiny square of the current digit by a different color
    foreach my $tiny ( @tiny_fields[1 .. 9] ) {



( run in 2.434 seconds using v1.01-cache-2.11-cpan-364913b4093 )