Games::Sudoku::OO::Board - Object oriented Sudoku solver
use Games::Sudoku::OO::Board; my $board = Sudoku::OO::Board->new(); $board->importGrid($txt_grid); print $board->toStr; # Tell Row 1 to solve itself as much as it can $board->solveRow(1); print $board->toStr; # Solve the whole board $board->solveAll; print $board->toStr;
Games::Sudoku::OO takes an object oriented approach to solving Sudoku, representing the column, row and square as derivatives of a base Set class, which encapsulates the solving rules. The Board class is also composed of cells (which know what set they are in) and is only responsible for loading and updating the cells and interacting with the users. The sets themselves do the solving.
- Doesn't solve all boards - Display of unsolved boards is a bit odd
- Email me
Michael Cope CPAN ID: COPE
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.