Examples of maxAgeIterator()


Examples of fr.neatmonster.nocheatplus.checks.moving.LocationTrace.maxAgeIterator()

                final ReachContext reachContext = reachEnabled ? reach.getContext(player, loc, damaged, damagedLoc, data, cc) : null;
                final DirectionContext directionContext = directionEnabled ? direction.getContext(player, loc, damaged, damagedLoc, data, cc) : null;
               
                final long traceOldest = tick; // - damagedTrace.getMaxSize(); // TODO: Set by window.
                // TODO: Iterating direction: could also start from latest, be it on occasion.
                Iterator<TraceEntry> traceIt = damagedTrace.maxAgeIterator(traceOldest);
               
                boolean violation = true; // No tick with all checks passed.
                boolean reachPassed = !reachEnabled; // Passed individually for some tick.
                boolean directionPassed = !directionEnabled; // Passed individually for some tick.
                // TODO: Maintain a latency estimate + max diff and invalidate completely (i.e. iterate from latest NEXT time)], or just max latency.
View Full Code Here

Examples of fr.neatmonster.nocheatplus.checks.moving.LocationTrace.maxAgeIterator()

      fail("Expect an exception on trying to get an empty iterator (latest).");
    } catch (IllegalArgumentException ex) {
     
    }
    try {
      trace.maxAgeIterator(0);
      fail("Expect an exception on trying to get an empty iterator (maxAge).");
    } catch (IllegalArgumentException ex) {
     
    }
  }
View Full Code Here

Examples of fr.neatmonster.nocheatplus.checks.moving.LocationTrace.maxAgeIterator()

    // Adding up to size elements.
    for (int i = 0; i < size; i++) {
      trace.addEntry(i, i, i, i);
    }
    for (int i = 0; i < size; i++) {
      Iterator<TraceEntry> it = trace.maxAgeIterator(i);
      long got = it.next().time;
      if (got != i) {
        fail("Bad entry point for iterator (maxAge), expected " + i + ", got instead: " + got);
      }
      int n = 1;
View Full Code Here

Examples of fr.neatmonster.nocheatplus.checks.moving.LocationTrace.maxAgeIterator()

  public void testMaxAgeFirstElementAnyway() {
    int size = 80;
    double mergeDist = -0.1; // Never merge.
    LocationTrace trace = new LocationTrace(size, mergeDist);
    trace.addEntry(0, 0, 0, 0);
    if (!trace.maxAgeIterator(1000).hasNext()) {
      fail("Expect iterator (maxAge) to always contain the latest element.");
    }
    trace.addEntry(1, 0, 0, 0);
    final Iterator<TraceEntry> it = trace.maxAgeIterator(2);
    if (!it.hasNext()) {
View Full Code Here

Examples of fr.neatmonster.nocheatplus.checks.moving.LocationTrace.maxAgeIterator()

    trace.addEntry(0, 0, 0, 0);
    if (!trace.maxAgeIterator(1000).hasNext()) {
      fail("Expect iterator (maxAge) to always contain the latest element.");
    }
    trace.addEntry(1, 0, 0, 0);
    final Iterator<TraceEntry> it = trace.maxAgeIterator(2);
    if (!it.hasNext()) {
      fail("Expect iterator (maxAge) to always contain the latest element.");
    }
    it.next();
    if (it.hasNext()) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.