Examples of Position


Examples of BasicDataType.Position

    fail("Not yet implemented");
  }

  public void testGetNext() {
    Map map = new Map((byte)10);
    Position currentPos = new Position();
    currentPos.setPosition(new Vector(5,5),0);
    //Position destinationPos = new Position(new Vector(2,0),0);
//    for(int y=1; y < 4; y++){
//      map.propagateOccupied((byte)1, (byte)y);
//    }
//    for(int y=1; y < 5; y++){
//      map.propagateEmpty((byte)0, (byte)y);
//    }
//    for(int x=1; x < 3; x++){
//      map.propagateEmpty((byte)x, (byte)0);
//    }
    Rect bound = new Rect(5, 6, 6,5);
    Search search = new Search(map);   
    for(int i = 0; i < 5 ; i++) {
      currentPos = search.getNext(currentPos, map, bound);
      if (currentPos == null) {
        bound.setRect(0, 9, 9, 0);
        currentPos = new Position(new Vector(5,5), 3);
        for(int j = 0; j < 5 ; j++) {
          currentPos = search.getNext(currentPos, map, bound);
          map.propagateEmpty((byte)currentPos.pos.x,(byte)currentPos.pos.y);
          map.showMap();
          System.out.println();
View Full Code Here

Examples of aimax.osm.data.Position

        }
        nextRadius = -1;
      }
      if (iResults.size() == 1 && wayName != null) {
        MapNode place = (MapNode) iResults.get(0);
        findWay(wayName, new Position(place.getLat(), place.getLon()),
            null);
      }
     
    } else {
      nextRadius *= 2;
View Full Code Here

Examples of at.ssw.coco.core.Mapping.Position

    if (index < 0) {
      index = (-index-1)-1;
      if (index < 0) index = 0;
    }

    return new Position(
        index + 1,
        pos - linePositions.get(index),
        pos);
  }
View Full Code Here

Examples of buildcraft.api.core.Position

  @Override
  public void transformToBlueprint(MappingRegistry registry,
      Translation transform) {
    NBTTagList nbttaglist = cpt.getTagList("Pos", 6);
    Position pos = new Position(nbttaglist.func_150309_d(0),
        nbttaglist.func_150309_d(1), nbttaglist.func_150309_d(2));
    pos = transform.translate(pos);

    cpt.setTag("Pos",
        this.newDoubleNBTList(pos.x, pos.y, pos.z));
View Full Code Here

Examples of cc.plural.jsonij.parser.Position

    }

    public BaseReaderParser(Reader reader) {
        this.peekValue = -1;
        this.hasPeeked = false;
        this.position = new Position();
    }
View Full Code Here

Examples of com.adobe.ac.pmd.parser.exceptions.UnExpectedTokenException.Position

   @Test
   public void testUnexpectedTokenException()
   {
      assertEquals( "Unexpected token: \"tokenText\" in file (myFileName) at 1:1. Expecting \"token\"",
                    new UnExpectedTokenException( "tokenText", new Position( 1, 1 ), MY_FILE_NAME, "token" ).getMessage() );
   }
View Full Code Here

Examples of com.alibaba.otter.canal.protocol.position.Position

        });

        cursors = new MapMaker().makeComputingMap(new Function<ClientIdentity, Position>() {

            public Position apply(ClientIdentity clientIdentity) {
                Position position = loadCursor(clientIdentity.getDestination(), clientIdentity);
                if (position == null) {
                    return nullCursor; // 返回一个空对象标识,避免出现异常
                } else {
                    return position;
                }
View Full Code Here

Examples of com.android.tools.lint.detector.api.Position

                        Location l = warning.location.getSecondary();
                        int otherLocations = 0;
                        while (l != null) {
                            String message = l.getMessage();
                            if (message != null && !message.isEmpty()) {
                                Position start = l.getStart();
                                int line = start != null ? start.getLine() : -1;
                                String path = mClient.getDisplayPath(warning.project, l.getFile());
                                writeLocation(l.getFile(), path, line);
                                mWriter.write(':');
                                mWriter.write(' ');
                                mWriter.write("<span class=\"message\">");           //$NON-NLS-1$
                                appendEscapedText(message);
                                mWriter.write("</span>");                            //$NON-NLS-1$
                                mWriter.write("<br />");                         //$NON-NLS-1$

                                String name = l.getFile().getName();
                                if (!(endsWith(name, DOT_PNG) || endsWith(name, DOT_JPG))) {
                                    String s = mClient.readFile(l.getFile());
                                    if (s != null && !s.isEmpty()) {
                                        mWriter.write("<pre class=\"errorlines\">\n");   //$NON-NLS-1$
                                        int offset = start != null ? start.getOffset() : -1;
                                        appendCodeBlock(s, line, offset);
                                        mWriter.write("\n</pre>");                       //$NON-NLS-1$
                                    }
                                }
                            } else {
                                otherLocations++;
                            }

                            l = l.getSecondary();
                        }
                        mWriter.write("</ul>");
                        if (otherLocations > 0) {
                            String id = "Location" + count + "Div";          //$NON-NLS-1$
                            mWriter.write("<button id=\"");                  //$NON-NLS-1$
                            mWriter.write(id);
                            mWriter.write("Link\" onclick=\"reveal('");      //$NON-NLS-1$
                            mWriter.write(id);
                            mWriter.write("');\" />"); //$NON-NLS-1$
                            mWriter.write(String.format("+ %1$d Additional Locations...",
                                    otherLocations));
                            mWriter.write("</button>\n");                    //$NON-NLS-1$
                            mWriter.write("<div id=\"");                     //$NON-NLS-1$
                            mWriter.write(id);
                            mWriter.write("\" style=\"display: none\">\n")//$NON-NLS-1$

                            mWriter.write("Additional locations: ");
                            mWriter.write("<ul>\n"); //$NON-NLS-1$
                            l = warning.location.getSecondary();
                            while (l != null) {
                                Position start = l.getStart();
                                int line = start != null ? start.getLine() : -1;
                                String path = mClient.getDisplayPath(warning.project, l.getFile());
                                mWriter.write("<li> "); //$NON-NLS-1$
                                writeLocation(l.getFile(), path, line);
                                mWriter.write("\n")//$NON-NLS-1$
                                l = l.getSecondary();
View Full Code Here

Examples of com.appspot.mscheckers.core.Position

    Checkers.log.info(viewMTR(mtr));
   
    if( !isValidMove(mtr) )
      return false;
 
    Position p,q, pb;
    for(int i = 0; i < mtr.length-1; i++){
      p = mtr[i];
      q = mtr[i+1];
      Checkers.log.info("Iteration : "+i+"move from "+p.getY()+","+p.getX()+" to "+q.getY()+","+q.getX());
      Checkers.log.info(viewCBoard());
      Checkers.log.info(cBoard[q.getY()][q.getX()]+"");
      Checkers.log.info(cBoard[p.getY()][p.getX()]+"");
      cBoard[q.getY()][q.getX()] = cBoard[p.getY()][p.getX()];
      cBoard[p.getY()][p.getX()] = 'v';
      if( (pb= Position.pawnBetween(p, q, cBoard) ) != null )
      {
        cBoard[pb.getY()][pb.getX()] = 'v';
      }
      mtIndex++;
View Full Code Here

Examples of com.artemis.ParamArchTest.Position

  public Entity create() {
    _sealed = true;
   
    Entity e = world.createEntity(archetype);
    if (_position) {
      Position c = positionMapper.get(e);
      c.x = _position_x;
      c.y = _position_y;
      _position = false;
    }
   
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.