Class Move

java.lang.Object
  |
  +--Move

public class Move
extends java.lang.Object

This class is used for representing moves in object form. It has methods used to set and return the source and destination square in row/column form.


Constructor Summary
Move(int sourceRow, int sourceCol, int destRow, int destCol)
          Builds a move object using the given data.
 
Method Summary
 int getDestCol()
          Returns the destination column.
 int getDestRow()
          Returns the destination row.
 int getSourceCol()
          Returns the source column.
 int getSourceRow()
          Returns the source row.
 void setDestination(int destRow, int destCol)
          Sets the destination square.
 void setSource(int sourceRow, int sourceCol)
          Sets the source square.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Move

public Move(int sourceRow,
            int sourceCol,
            int destRow,
            int destCol)
Builds a move object using the given data.

Method Detail

getSourceRow

public int getSourceRow()
Returns the source row.


getSourceCol

public int getSourceCol()
Returns the source column.


getDestRow

public int getDestRow()
Returns the destination row.


getDestCol

public int getDestCol()
Returns the destination column.


setSource

public void setSource(int sourceRow,
                      int sourceCol)
Sets the source square.


setDestination

public void setDestination(int destRow,
                           int destCol)
Sets the destination square.