edu.columbia.cs.cs1007.checkers
Class Move

java.lang.Object
  extended by edu.columbia.cs.cs1007.checkers.Move

public class Move
extends java.lang.Object

Implementation of a move of the checker board.

Author:
Julia Stoyanovich (jds2109@columbia.edu) COMS 1007, Summer 2009.

Constructor Summary
Move(int sourceRow, int sourceCol, Constants.VERTICAL_DIRECTION verticalDir, Constants.HORIZONTAL_DIRECTION horizontalDir)
          Constructor.
 
Method Summary
 int getSourceColumn()
          Get the column of the starting position.
 int getSourceRow()
          Get the row of the starting position.
 int getTargetColumn()
          Computer the column of the target position.
 int getTargetRow()
          Compute the row of the target position.
 java.lang.String toString()
          Generate a string representation of the move.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Move

public Move(int sourceRow,
            int sourceCol,
            Constants.VERTICAL_DIRECTION verticalDir,
            Constants.HORIZONTAL_DIRECTION horizontalDir)
Constructor.

Parameters:
sourceRow -
sourceCol -
verticalDir -
horizontalDir -
Method Detail

getSourceRow

public int getSourceRow()
Get the row of the starting position.

Returns:
row number

getSourceColumn

public int getSourceColumn()
Get the column of the starting position.

Returns:
column number

getTargetRow

public int getTargetRow()
Compute the row of the target position.

Returns:
row number

getTargetColumn

public int getTargetColumn()
Computer the column of the target position.

Returns:
column number

toString

public java.lang.String toString()
Generate a string representation of the move.

Overrides:
toString in class java.lang.Object
Returns:
string representation