game
Class AbstractPlayer
- Transport
public abstract class AbstractPlayer
extends java.lang.Object
Abstract class AbstractPlayer - Defines the properties of player
void | change(Node n)- This method changes the position of the Fugitive without adding it to the
prevPositions array.
|
Node | getPosition()- This method gives the position of this player
|
LinkedList | getPrevPos()- This method returns the previous positions of the player
|
position
protected Node position
prevPositions
protected LinkedList prevPositions
change
public void change(Node n)
This method changes the position of the Fugitive without adding it to the
prevPositions array.
n - the new node position of the detective
getPosition
public Node getPosition()
This method gives the position of this player
- the position of the player
getPrevPos
public LinkedList getPrevPos()
This method returns the previous positions of the player
- the array of the previous node positions of the player