|
Algorithm Development Kit 1.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectalgs.model.problems.tictactoe.model.Cell
public class Cell
Represents a column, row location on the TicTacToe board.
| Field Summary | |
|---|---|
int |
col
The column for the board location. |
int |
row
The row for the board location. |
| Constructor Summary | |
|---|---|
Cell(Cell c)
Copy constructor. |
|
Cell(int c,
int r)
Constructs a Cell object given a column and row. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
Override equals() method from java.lang.Object. |
int |
hashCode()
Hashcode must be implemented if this cell is to be used in a Hashtable. |
boolean |
isAdjacent(Cell c)
Determines if this is adjacent to the given cell either horizontally or vertically. |
java.lang.String |
toString()
Return representation of cell. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final int col
public final int row
| Constructor Detail |
|---|
public Cell(int c,
int r)
c - r - public Cell(Cell c)
c - | Method Detail |
|---|
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean isAdjacent(Cell c)
c - desired cell against which to compare
true if this is adjacent to c either
horizontally/vertically; false otherwise.public java.lang.String toString()
toString in class java.lang.Object
|
Algorithm Development Kit 1.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||