Login   Register  
PHP Classes

File: example2.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Richard Munroe  >  Sudoku  >  example2.php  >  Download  
File: example2.php
Role: Example script
Content type: text/plain
Description: Example of using Sudoku classes.
Class: Sudoku
Generate and solve sudoku puzzles
Author: By
Last change:
Date: 9 years ago
Size: 528 bytes


Class file image Download

include_once("class.Sudoku.php") ;

 * @author Dick Munroe <munroe@csworks.com>
 * @copyright copyright @ 2005 by Dick Munroe, Cottage Software Works, Inc.
 * @license http://www.csworks.com/publications/ModifiedNetBSD.html
 * @package SudokuExample
 * Generate a puzzle and print the initial position and the solution.

$p = new Sudoku() ;

$theInitialPosition $p->generatePuzzle() ;

$i = new Sudoku() ;

$i->initializePuzzleFromArray($theInitialPosition) ;

$i->printSolution() ;

$p->printSolution() ;