Examples of Map


Examples of BasicDataType.Map

   
    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();
        }
        return;
      }
      map.propagateEmpty((byte)currentPos.pos.x,(byte)currentPos.pos.y);
      map.showMap();
      System.out.println();
    }

   
    //map.showMap();
View Full Code Here

Examples of Modules.Map

         
        }
    }  
   
    public void showMap(int id, String type){
        Map aux = cjtMap.getMap(id);
        AuxiliarElement elem;
        List<String[]> dat = new ArrayList();
        Stack<AuxiliarElement> auxiliar = (Stack)aux.getCjtElement().clone();
        String [] list;
        int i=0;
        while(!auxiliar.isEmpty()){           
            elem = auxiliar.peek();
            auxiliar.pop();
            list = new String[6];          
            list[0] = elem.getName();
            list[1] = String.valueOf(elem.getDim().getX());
            list[2] = String.valueOf(elem.getDim().getY());
        
            switch (elem.getFlag()){
                    case 0:
                        list[3] = String.valueOf(elem.getFinalX());
                        list[4] = String.valueOf(elem.getFinalY());
                        break;
                    case 1:           
                        list[3] = String.valueOf(elem.getFinalX());
                        list[4] = String.valueOf(elem.getFinalY()-elem.getDim().getY()+1);                       
                        break;
                    case 2:
                        list[3] = String.valueOf(elem.getFinalX()-elem.getDim().getX()+1);
                        list[4] = String.valueOf(elem.getFinalY()-elem.getDim().getY());
                        break;
                    case 3:
                        list[3] = String.valueOf(elem.getFinalX()-elem.getDim().getX());
                        list[4] = String.valueOf(elem.getFinalY());
                        break;
           
           
            list[5] = "S";           
            dat.add(list);           
        }
        if(type.equals("2D")){
            mainFrame.removeCjtMapView();
            mainFrame.showMap2D(aux.getDimensionMap().getX(), aux.getDimensionMap().getY(), dat, aux.getNameRoom(), aux.getDoors(), aux.getWindows());
        }      
        //window = new WindowView(aux.getDimensionMap().getX(), aux.getDimensionMap().getY(), dat, aux.getNameRoom());       
    }
View Full Code Here

Examples of _api.alienfactory.javamappy.Map

    if (inputStream == null) throw new IllegalArgumentException("Input parameter [inputStream] was null");
   
    log.trace("loadMap() - Starting...");
    log.info("Loading Map from InputStream");
   
    Map     map = new Map();
    ChunkLoader  chkMapHeader;
    long        lngBytesToRead;
   
    try
    {
View Full Code Here

Examples of aima.core.environment.map.Map

 
  /**
   * Represents roads by lines and locations by name-labeled points.
   */
  protected void paintMap(java.awt.Graphics2D g2) {
    Map envMap = getMapEnv().getMap();
    Map aMap = (agentMap != null) ? agentMap : envMap;
    List<Roadblock> roadblocks = new ArrayList<Roadblock>();
    for (String l1 : envMap.getLocations()) {
      Point2D pt1 = envMap.getPosition(l1);
      List<String> linkedLocs = envMap.getLocationsLinkedTo(l1);
      for (String l2 : aMap.getLocationsLinkedTo(l1))
        if (!linkedLocs.contains(l2))
          linkedLocs.add(l2);
      for (String l2 : linkedLocs) {
        Point2D pt2 = envMap.getPosition(l2);
        g2.setColor(Color.lightGray);
        g2.drawLine(x(pt1), y(pt1), x(pt2), y(pt2));
        boolean blockedInEnv = !envMap.getLocationsLinkedTo(l2)
            .contains(l1);
        boolean blockedInAgent = !aMap.getLocationsLinkedTo(l2)
            .contains(l1);
        roadblocks.add(new Roadblock(pt1, pt2, blockedInEnv,
            blockedInAgent));
        if (blockedInEnv && blockedInAgent) {
          boolean blockedInEnvOtherDir = !envMap
              .getLocationsLinkedTo(l1).contains(l2);
          boolean blockedInAgentOtherDir = !aMap
              .getLocationsLinkedTo(l1).contains(l2);
          roadblocks.add(new Roadblock(pt2, pt1,
              blockedInEnvOtherDir, blockedInAgentOtherDir));
        }
      }
View Full Code Here

Examples of amidst.map.Map

      for (MapObjectPlayer player : proj.save.getPlayers()) {
        menu.add(new PlayerMenuItem(this, player, playerLayer));
      }
    }
   
    worldMap = new Map(fragmentManager); //TODO: implement more layers
    worldMap.setZoom(curZoom);
   
    widgets.add(new FpsWidget(this).setAnchorPoint(CornerAnchorPoint.BOTTOM_LEFT));
    widgets.add(new SeedWidget(this).setAnchorPoint(CornerAnchorPoint.TOP_LEFT));
    widgets.add(new DebugWidget(this).setAnchorPoint(CornerAnchorPoint.BOTTOM_RIGHT));
View Full Code Here

Examples of be.demmel.jgws.entities.Map

        newResultingBytes[i] = (short) (resultingBytes[i] & 0xFF);
      }

      P009_ReferToGameServer referToGameServer = new P009_ReferToGameServer();
      referToGameServer.setLoginCount(serverData.getLoginCount());
      Map map = this.getMapByMapId(serverData.getMapId());
      // FIXME: what if no reply?

      int gameMapId = map.getGameMapId();

      referToGameServer.setGameMapId(gameMapId);
      // TODO: utility method
      referToGameServer.setSecurityKey1(0L | newKeys1[3] << 24 | newKeys1[2] << 16 | newKeys1[1] << 8 | newKeys1[0]);
      referToGameServer.setSecurityKey2(0L | newKeys2[3] << 24 | newKeys2[2] << 16 | newKeys2[1] << 8 | newKeys2[0]);
View Full Code Here

Examples of bm.vm.sys.Map

        addSystemClass( "byte" );
        addSystemClass( "short" );
        addSystemClass( "int" );
        addSystemClass( "long" );
        addSystemClass( "double" );
        systemClasses.put( "map", new Map( vm ) );
        systemClasses.put( "system", new VMSystem( vm ) );
        systemClasses.put( "object", new ScriptingObject( vm ) );
        systemClasses.put( "void", new Void( vm ) );
        aliases = new Hashtable( 9 );
        aliases.put( "sys.Boolean", "boolean" );
View Full Code Here

Examples of ch.deif.meander.Map

  @Test
  public void testView() throws PartInitException {
    selectJavaProject();
    Layers layers = testLayersLoaded();
    Map map = layers.getMap();
    assertEquals(2, map.locationCount());
  }
View Full Code Here

Examples of ch.rakudave.jnetmap.model.Map

    plusButton.setContentAreaFilled(false);
    plusButton.setBorder(BorderFactory.createEmptyBorder());
    plusButton.addActionListener(new ActionListener() {
      @Override
      public void actionPerformed(ActionEvent e) {
        openTab(new Map());
      }
    });
    setTabComponentAt(0, plusButton);
  }
View Full Code Here

Examples of chunmap.view.Map

  private byte[] createData() throws IOException {
    // create map
//    View view = new ViewPort(width, height,3);
//    Painter painter = new Painter(width, height);
    Map map = new Map(width, height);
    map.getLayerCollection().setLayers(capbilities.getLayers());

    // getImage
    map.getView().setViewEnvelop(envelop);
    map.render();
    Image image = (Image)map.getPainter().getData();

    // toByteArray
    return ImageUtil.Image2ByteArray(image, formatName);
  }
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.