Class NetworkMove

java.lang.Object
  extended by NetworkMove
All Implemented Interfaces:
java.io.Serializable

public class NetworkMove
extends java.lang.Object
implements java.io.Serializable

An object representation of a move, without a reference to the Player who made the move.

Author:
See Also:
Serialized Form

Constructor Summary
NetworkMove(int startLoc, int endLoc)
          Create a move with the starting location and ending location passed in as paremeters.
NetworkMove(Move aMove)
          Gets the start and end locations from an incoming Move.
 
Method Summary
 int endLocation()
          Return the ending location of this move.
 void execute(NetworkPlayer parent)
          Makes a move from the NetworkPlayer.
 int startLocation()
          Return the starting location of this move.
 java.lang.String toString()
          toString method for this object that will give start and end locations.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NetworkMove

public NetworkMove(int startLoc,
                   int endLoc)
Create a move with the starting location and ending location passed in as paremeters.

Parameters:
startLoc - The starting point of the move
endLoc - The ending point of the move

NetworkMove

public NetworkMove(Move aMove)
Gets the start and end locations from an incoming Move.

Parameters:
aMove - - the incoming Move object.
Method Detail

execute

public void execute(NetworkPlayer parent)
Makes a move from the NetworkPlayer.

Parameters:
parent - - the NetworkPlayer.

startLocation

public int startLocation()
Return the starting location of this move.

Returns:
The starting point of the move.

endLocation

public int endLocation()
Return the ending location of this move.

Returns:
The ending point of this location.

toString

public java.lang.String toString()
toString method for this object that will give start and end locations.

Overrides:
toString in class java.lang.Object
Returns:
a String representation for this object.