game
Class Fugitive
- Transport
Uses class Player to define the properties of a fugitive.
changePosition
public int changePosition(Node n)
This method changes the position of the fugitive
n
- the node to where fugitive has to be shifted
- the type of the link connecting n and the previous position of
fugitive
getBlackTickets
public int getBlackTickets()
- the number of black tickets this fugitive has.
setBlackTickets
public void setBlackTickets(int n)
Set the number of black tickets the fugitive has initially.
useBlackTicket
public boolean useBlackTicket()
This is called when a black ticket is used to move the fugitive.
It decreases the number of black tickets by 1, if not already zero,
and uses a black ticket for the move last made by the fugitive.
- true if the fugitive can use a black ticket, false otherwise