com.eriksilkensen.sudoku
Class WebBoardFactory

java.lang.Object
  extended by com.eriksilkensen.sudoku.WebBoardFactory
All Implemented Interfaces:
BoardFactory

public class WebBoardFactory
extends java.lang.Object
implements BoardFactory

This Factory creates Boards by scraping the HTML off of a Sudoku website and parsing it into a Board

The website is run by Vegard Hanssen who has granted me with permission for using his Boards.

Since:
1.0.1
Version:
02/13/07
Author:
Erik Silkensen

Constructor Summary
WebBoardFactory()
           
 
Method Summary
 Board createBoard(BoardDifficulties difficulty)
          createBoard() implementation which just delegates the actual creation to the private makeBoard() method If an Exception is encountered a stack trace is printed to standard output and then a blank, default Board is created and returned.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebBoardFactory

public WebBoardFactory()
Method Detail

createBoard

public Board createBoard(BoardDifficulties difficulty)
createBoard() implementation which just delegates the actual creation to the private makeBoard() method If an Exception is encountered a stack trace is printed to standard output and then a blank, default Board is created and returned. It is the caller's responsibility to detect the blank Board and to decide what to do.

Specified by:
createBoard in interface BoardFactory
Parameters:
difficulty - the difficulty level of the Board to create