com.eriksilkensen.sudoku
Class BoardInventory

java.lang.Object
  extended by com.eriksilkensen.sudoku.BoardInventory
All Implemented Interfaces:
java.io.Serializable

public class BoardInventory
extends java.lang.Object
implements java.io.Serializable

Serializable Inventory object that keeps track of all the different Boards saved into their own ArrayList.

Since:
1.0
Version:
02/13/07
Author:
Erik Silkensen
See Also:
Serialized Form

Constructor Summary
BoardInventory()
          Initializes each ArrayList of Boards
 
Method Summary
 void add(Board board)
          Adds a Board to the Inventory
 Board get(BoardDifficulties difficulty)
          Gets a random Board at the specified difficulty.
 Board get(int ID)
          Gets a Board with the specified ID number.
 java.util.ArrayList<Board> getEasyBoards()
          Returns the Easy Boards
 java.util.ArrayList<Board> getHardBoards()
          Returns the Hard Boards
 java.util.ArrayList<Board> getHarderBoards()
          Returns the Harder Boards
 java.util.ArrayList<Board> getMediumBoards()
          Returns the Medium Boards
 java.util.ArrayList<Board> getSuperEasyBoards()
          Returns the Super Easy Boards
 java.util.ArrayList<Board> getSuperHardBoards()
          Returns the Super Hard Boards
 java.util.ArrayList<Board> getVeryEasyBoards()
          Returns the Very Easy Boards
 java.util.ArrayList<Board> getVeryHardBoards()
          Returns the Very Hard Boards
 int indexOf(Board board)
          Returns the first index of the specified Board in the Inventory
 int individualSize()
          Returns the individual size of each difficulty level in the Inventory
 int totalSize()
          Returns the total size of the Inventory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BoardInventory

public BoardInventory()
Initializes each ArrayList of Boards

Method Detail

totalSize

public int totalSize()
Returns the total size of the Inventory


individualSize

public int individualSize()
Returns the individual size of each difficulty level in the Inventory


indexOf

public int indexOf(Board board)
Returns the first index of the specified Board in the Inventory

Parameters:
board - the Board to find the index of

getSuperEasyBoards

public java.util.ArrayList<Board> getSuperEasyBoards()
Returns the Super Easy Boards


getVeryEasyBoards

public java.util.ArrayList<Board> getVeryEasyBoards()
Returns the Very Easy Boards


getEasyBoards

public java.util.ArrayList<Board> getEasyBoards()
Returns the Easy Boards


getMediumBoards

public java.util.ArrayList<Board> getMediumBoards()
Returns the Medium Boards


getHardBoards

public java.util.ArrayList<Board> getHardBoards()
Returns the Hard Boards


getHarderBoards

public java.util.ArrayList<Board> getHarderBoards()
Returns the Harder Boards


getVeryHardBoards

public java.util.ArrayList<Board> getVeryHardBoards()
Returns the Very Hard Boards


getSuperHardBoards

public java.util.ArrayList<Board> getSuperHardBoards()
Returns the Super Hard Boards


get

public Board get(BoardDifficulties difficulty)
Gets a random Board at the specified difficulty. If there is a problem, a blank Board is created and returned.

Parameters:
difficulty - the difficulty of the Board to get

get

public Board get(int ID)
Gets a Board with the specified ID number. If there is a problem, a blank Board is created and returned.

Parameters:
ID - the ID number of the Board to get

add

public void add(Board board)
Adds a Board to the Inventory

Parameters:
board - the Board to add