private MOVE _checkGhostDir(Ghost ghost,MOVE direction)
	{
		//Gets the neighbours of the node with the node that would correspond to reverse removed
		Node node=currentMaze.graph[ghost.currentNodeIndex];
		
		//The direction is possible and not opposite to the previous direction of that ghost
		if(node.neighbourhood.containsKey(direction) && direction!=ghost.lastMoveMade.opposite())
			return direction;
		else
		{
			if(node.neighbourhood.containsKey(ghost.lastMoveMade))
				return ghost.lastMoveMade;
			else
			{
				MOVE[] moves=node.allPossibleMoves.get(ghost.lastMoveMade);
				return moves[rnd.nextInt(moves.length)];				
			}
		}
	}