Pages : 1
#1 Le 04/05/2009, à 19:59
- Theys
sudoku resolver
hello voila pour les afficionados du sudoku....
en perl
#!/usr/bin/perl -w
use strict;
use Games::Sudoku::Board;
my @board = qw(
9 0 8 7 0 6 0 0 0
0 0 0 8 0 0 0 0 1
0 4 7 0 2 5 0 0 0
8 7 0 0 0 0 0 0 0
2 6 0 0 0 0 0 7 5
0 0 0 0 0 0 0 4 3
0 0 0 3 8 0 6 5 0
3 0 0 0 0 2 0 0 0
0 0 0 5 0 4 9 0 8
);
my $game = new Games::Sudoku::Board($game_name, $debug, $pause);
$game->init(\@board);
$game->displayBoard();
$game->solve();
$game->displayBoard();
$game->verify();
Pages : 1