Class Position

java.lang.Object
  |
  +--Position

public class Position
extends java.lang.Object


Field Summary
protected  int x
           
protected  int y
           
 
Constructor Summary
Position(int x, int y)
          Creates a new instance of Position
 
Method Summary
 int getXPos()
          This method gets the x coordinates of the Position P.S.
 int getYPos()
          This method gets the y coordinates of the Position P.S.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

x

protected int x

y

protected int y
Constructor Detail

Position

public Position(int x,
                int y)
Creates a new instance of Position

Method Detail

getXPos

public int getXPos()
This method gets the x coordinates of the Position P.S. You will not need to use this method. You are allowed to use only the constructor to make a new Position instance for the object whose position you wish to communicate

Returns:
an int value

getYPos

public int getYPos()
This method gets the y coordinates of the Position P.S. You will not need to use this method. You are allowed to use only the constructor to make a new Position instance for the pawn whose position you wish to communicate

Returns:
an int value