@SuppressWarnings("deprecation")
	public MOVE getMove(Game game,long timeDue)
	{		
		int currentNodeIndex=game.getPacmanCurrentNodeIndex();	
		int[] activePills=game.getActivePillsIndices();
		int[] activePowerPills=game.getActivePowerPillsIndices();
		int[] targetNodeIndices=new int[activePills.length+activePowerPills.length];
		
		for(int i=0;i<activePills.length;i++)
			targetNodeIndices[i]=activePills[i];
		
		for(int i=0;i<activePowerPills.length;i++)
			targetNodeIndices[activePills.length+i]=activePowerPills[i];		
		
		int nearest = game.getClosestNodeIndexFromNodeIndex(currentNodeIndex,targetNodeIndices,DM.PATH);
				
		//add the path that Ms Pac-Man is following
//		GameView.addPoints(game,Color.GREEN,game.getShortestPath(game.getPacmanCurrentNodeIndex(),nearest));
		
		//add the path from Ms Pac-Man to the first power pill
//		GameView.addPoints(game,Color.CYAN,game.getShortestPath(game.getPacmanCurrentNodeIndex(),game.getPowerPillIndices()[0]));
//		GameView.addPoints(game,Color.CYAN,game.getAStarPath(game.getPacmanCurrentNodeIndex(),game.getPowerPillIndices()[0]));
//		GameView.addPoints(game,Color.YELLOW,game.getNonReversePath(game.getPacmanCurrentNodeIndex(),game.getPowerPillIndices()[0],game.getPacmanLastMoveMade()));
		
		//add lines connecting Ms Pac-Man and the power pills
//		for(int i=0;i<activePowerPills.length;i++)
//			GameView.addLines(game,Color.CYAN,game.getPacmanCurrentNodeIndex(),activePowerPills[i]);
		
		//add lines to the ghosts (if not in lair) - green if edible, red otherwise
//		for(GHOST ghostType : GHOST.values())									
//			if(game.getGhostLairTime(ghostType)==0)
//				if(game.isGhostEdible(ghostType))
//					GameView.addLines(game,Color.GREEN,game.getPacmanCurrentNodeIndex(),game.getGhostCurrentNodeIndex(ghostType));
//				else
//					GameView.addLines(game,Color.RED,game.getPacmanCurrentNodeIndex(),game.getGhostCurrentNodeIndex(ghostType));
		
		
		//add the path AND ghost path from Ghost 0 to the first power pill (to illustrate the differences)
		if(game.getGhostLairTime(GHOST.BLINKY)==0 && activePowerPills.length>0)
		{
			GameView.addPoints(game,Color.RED,game.getAStarPath(game.getGhostCurrentNodeIndex(GHOST.BLINKY),activePowerPills[0],MOVE.NEUTRAL));
			GameView.addPoints(game,Color.YELLOW,game.getAStarPath(game.getGhostCurrentNodeIndex(GHOST.BLINKY),activePowerPills[0],game.getGhostLastMoveMade(GHOST.BLINKY)));
		}
		
		//add the path from Ghost 0 to the closest power pill
//		if(game.getGhostLairTime(GHOST.BLINKY)==0 && activePowerPills.length>0)
//			GameView.addPoints(game,Color.WHITE,game.getAStarPath(game.getGhostCurrentNodeIndex(GHOST.BLINKY),
//					game.getClosestNodeIndexFromNodeIndex(game.getGhostCurrentNodeIndex(GHOST.BLINKY),activePowerPills,DM.PATH)));
		
		//adds the paths the ghost would need to follow to reach Ms Pac-Man
//		Color[] colors={Color.RED,Color.BLUE,Color.MAGENTA,Color.ORANGE};
//		
//		int index=0;
//		
//		for(GHOST ghostType : GHOST.values())
//			if(game.getGhostLairTime(ghostType)==0)
//				GameView.addPoints(game,colors[index++],game.getAStarPath(game.getGhostCurrentNodeIndex(ghostType),currentNodeIndex,game.getGhostLastMoveMade(ghostType)));
	
		return game.getNextMoveTowardsTarget(game.getPacmanCurrentNodeIndex(),nearest,DM.PATH);
	}