Examples of translated()


Examples of kodkod.engine.fol2sat.TranslationRecord.translated()

        if (val==null) {
          val = new int[1];
          rootLits.put(rec.translated(), val);
        }
        val[0] = rec.literal();
        rootNodes.put(rec.translated(), rec.node());
      }
    }
   
    final SparseSequence<Formula> lits = new TreeSequence<Formula>();
    for(Map.Entry<Formula,int[]> entry : rootLits.entrySet()) {
View Full Code Here

Examples of kodkod.engine.fol2sat.TranslationRecord.translated()

      constNodes = new LinkedHashMap<Formula,Boolean>();
      for(Iterator<TranslationRecord> itr = log.replay(filter); itr.hasNext(); ) {
        TranslationRecord rec = itr.next();
        int lit = rec.literal();
        if (Math.abs(lit) != Integer.MAX_VALUE) {
          constNodes.remove(rec.translated());
        } else if (lit==Integer.MAX_VALUE) {
          constNodes.put(rec.translated(), Boolean.TRUE);
        } else {
          constNodes.put(rec.translated(), Boolean.FALSE);
        }
View Full Code Here

Examples of kodkod.engine.fol2sat.TranslationRecord.translated()

        TranslationRecord rec = itr.next();
        int lit = rec.literal();
        if (Math.abs(lit) != Integer.MAX_VALUE) {
          constNodes.remove(rec.translated());
        } else if (lit==Integer.MAX_VALUE) {
          constNodes.put(rec.translated(), Boolean.TRUE);
        } else {
          constNodes.put(rec.translated(), Boolean.FALSE);
        }
      }
    }
View Full Code Here

Examples of kodkod.engine.fol2sat.TranslationRecord.translated()

        if (Math.abs(lit) != Integer.MAX_VALUE) {
          constNodes.remove(rec.translated());
        } else if (lit==Integer.MAX_VALUE) {
          constNodes.put(rec.translated(), Boolean.TRUE);
        } else {
          constNodes.put(rec.translated(), Boolean.FALSE);
        }
      }
    }
   
    /**
 
View Full Code Here

Examples of megamek.common.Coords.translated()

        // Spread to the next hex downwind on a 12 if the first hex wasn't
        // burning...
        // unless a higher hex intervenes
        IHex nextHex = game.getBoard().getHex(nextCoords);
        IHex jumpHex = game.getBoard().getHex(nextCoords.translated(windDir));
        if ((nextHex != null) && (jumpHex != null) && !(nextHex.containsTerrain(Terrains.FIRE))
                && ((curHeight >= nextHex.ceiling()) || (jumpHex.ceiling() >= nextHex.ceiling()))) {
            // we've already gone one step in the wind direction, now go another
            directroll.addModifier(3, "crossing non-burning hex");
            spreadFire(nextCoords.translated(windDir), directroll, curHeight);
View Full Code Here

Examples of megamek.common.Coords.translated()

        IHex jumpHex = game.getBoard().getHex(nextCoords.translated(windDir));
        if ((nextHex != null) && (jumpHex != null) && !(nextHex.containsTerrain(Terrains.FIRE))
                && ((curHeight >= nextHex.ceiling()) || (jumpHex.ceiling() >= nextHex.ceiling()))) {
            // we've already gone one step in the wind direction, now go another
            directroll.addModifier(3, "crossing non-burning hex");
            spreadFire(nextCoords.translated(windDir), directroll, curHeight);
        }

        // spread fire 60 degrees clockwise....
        spreadFire(src.translated((windDir + 1) % 6), obliqueroll, curHeight);
View Full Code Here

Examples of megamek.common.Coords.translated()

            if (!hexNeedsBridge(board.getHex(next))) {
                end = next;
                break;
            }
            hexes.add(next);
            next = next.translated(direction);
        }
        if (end != null) {
            // got start and end, can we make a bridge?
            if (hexes.size() == 0)
                return null;
View Full Code Here

Examples of megamek.common.Coords.translated()

            Coords c = i.next();
            IHex hex = board.getHex(c);
            // work out exits...
            int exits = 0;
            for (int dir = 0; dir < 6; dir++) {
                if (building.containsCoords(c.translated(dir))) {
                    exits |= (1 << dir);
                }
            }

            // remove everything
View Full Code Here

Examples of megamek.common.Coords.translated()

        IHex curHex = game.getBoard().getHex(start);
        Report r;
        int skidDistance = 0; // actual distance moved
        ArrayList<Entity> avoidedChargeUnits = new ArrayList<Entity>();
        while (!entity.isDoomed() && (distance > 0)) {
            nextPos = curPos.translated(direction);
            // Is the next hex off the board?
            if (!game.getBoard().contains(nextPos)) {

                // Can the entity skid off the map?
                if (game.getOptions().booleanOption("push_off_board")) {
View Full Code Here

Examples of megamek.common.Coords.translated()

                        int forward = Math.max(step.getVelocityLeft() / 2, 1);
                        if (forward < step.getVelocityLeft()) {
                            fellDuringMovement = true;
                        }
                        while (forward > 0) {
                            curPos = curPos.translated(step.getFacing());
                            forward--;
                            distance++;
                            // make sure it didn't fly off the map
                            if (!game.getBoard().contains(curPos)) {
                                r = new Report(9370, Report.PUBLIC);
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.