*/
private TreeSet getPossibleMoves(VirtualBoard board, int detNo)
{
if(!canMove(board, detNo)) return null;
boolean added=false;
Node n=board.getDetectives()[detNo].getPosition();
Link []lk=n.getLinks();
TreeSet possibleMoves=new TreeSet();
for(int i=0;i<lk.length;i++)
{
boolean canGoToThisNode=true;
Node toNode=lk[i].getToNode();
Detective[] det=Manager.getGame().getBoard().getDetectives();
for(int j=0;j<det.length;j++)
if(toNode.equals(det[j].getPosition())) canGoToThisNode=false;
int t=lk[i].getType();
switch(t)
{
case TAXI:if(getDetectives()[detNo].getTaxiTickets()<=0) if(canGoToThisNode) canGoToThisNode=false;
break;
case BUS:if(getDetectives()[detNo].getBusTickets()<=0) if(canGoToThisNode) canGoToThisNode=false;
break;
case UG:if(getDetectives()[detNo].getUndergroundTickets()<=0) if(canGoToThisNode) canGoToThisNode=false;
break;
case BLACK:canGoToThisNode=false;
break;
}
if(canGoToThisNode) possibleMoves.add(new Move(toNode.getPosition(),t));
}
return possibleMoves;
}