Class Square

java.lang.Object
  |
  +--Square

class Square
extends java.lang.Object

a single Square of the grid


Field Summary
(package private)  int contents
          the contents of the Square
(package private)  Pair parent
          coordinates of the parent of the Square, during searching
 
Constructor Summary
(package private) Square(int contents)
          Construct a square from specified contents.
 
Method Summary
(package private)  boolean contains(int value)
          See if the Square contains specified contents.
(package private)  int get()
          Return the contents of the Square.
(package private)  boolean isMarked()
          Set if this Square has been visited.
(package private)  void set(int contents)
          Set the contents of the Square.
(package private)  void setParent(Pair parent)
          Set the parent of this Square
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

contents

int contents
the contents of the Square


parent

Pair parent
coordinates of the parent of the Square, during searching

Constructor Detail

Square

Square(int contents)
Construct a square from specified contents.

Method Detail

get

int get()
Return the contents of the Square.


set

void set(int contents)
Set the contents of the Square.


contains

boolean contains(int value)
See if the Square contains specified contents.


setParent

void setParent(Pair parent)
Set the parent of this Square


isMarked

boolean isMarked()
Set if this Square has been visited.