@Override
	public BlockFace giveRouterDirection() {
		// check if we are in the good region
		if (this.getSignAddress().isValid()
				&& this.getSignAddress().getRegion().getAmount() != getWandererRegion()) {
			// case this is not the right region
			DirectionRegistry dir = RoutingTable.getDirection(getWandererRegion());
			if (dir != null)
				return dir.getBlockFace();
			return this.getFrom().getBlockFace();
		}

		// there is a cookie (so it is cookie A) or it's a reset cart
		if (this.getStart().empty() ^ this.getEnd().empty()) {
			int signring = this.getSignAddress().getTrack().getAmount();
			int preferredroute = this.getStart().peek();

			// if we are not arrived yet or in ring 0, we continue
			if (signring == 0 || signring != preferredroute)
				try {
					return RoutingTable.getDirection(preferredroute).getBlockFace();
				} catch (NullPointerException e) {
					// no route to ring
					return AbstractWanderer.getRandomBlockFace(RoutingTable, getFrom().getBlockFace());
				}
		}
		else {
			// no cookie
			// check counter
			if (this.getCounter().isAllFull(0, 15)) {
				// we configured all stations
				// incrementing ring counter in the RoutingTableExchange map
				int ring = this.getCounter().getCount(counterSlot.RING.slot);
				incrementRingCounter(ring);

				// reset counters
				this.getCounter().resetAll();
				//clear stacks and set cookie B
				this.getStart().clear();
				this.getEnd().clear();
				this.getStart().push(0);

				save();

				// the route where we went the lesser
				int preferredroute = this.getContent().getMinDistanceRing(RoutingTable, getFrom());
				DirectionRegistry dir;
				if ((dir = RoutingTable.getDirection(preferredroute)) != null)
					return dir.getBlockFace();
				return AbstractWanderer.getRandomBlockFace(RoutingTable, getFrom().getBlockFace());
			}
		}
		return this.getFrom().getBlockFace();
	}