tron
Class Cell

java.lang.Object
  extended by tron.Cell

public class Cell
extends java.lang.Object

A simple class that represents the position of a cell on the board with a row and column.

Author:
bederson

Field Summary
 int col
           
 int row
           
 
Constructor Summary
Cell()
          Creates a cell with no position.
Cell(Cell otherCell)
          Copy constructor
Cell(int row, int col)
          Creates a cell position given a row and column
 
Method Summary
 boolean equals(java.lang.Object obj)
          Determines if the parameter is a cell that has the same values as this cell.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

row

public int row

col

public int col
Constructor Detail

Cell

public Cell()
Creates a cell with no position. The row and column are initialized to TronConstants.CELL_EMPTY;


Cell

public Cell(int row,
            int col)
Creates a cell position given a row and column

Parameters:
row - the row
col - the column

Cell

public Cell(Cell otherCell)
Copy constructor

Parameters:
otherCell - the cell to copy
Method Detail

equals

public boolean equals(java.lang.Object obj)
Determines if the parameter is a cell that has the same values as this cell.

Overrides:
equals in class java.lang.Object
Returns:
true if the parameter's content is equal to this.


Web Accessibility