Package BasicDataType

Examples of BasicDataType.Vector


  }

  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


    //map.getVisitedSquares();
  }
 
  public void testClosestPath() {
    Map map = new Map((byte)5);
    Position currentPos = new Position(new Vector(0,0),0);
    Position destinationPos = new Position(new Vector(2,0),0);
    for(int y=0; y < 3; y++){
      map.propagateOccupied((byte)1, (byte)y);
    }
    Position nextPosition = new Position();
    Search search = new Search(map);
View Full Code Here

TOP

Related Classes of BasicDataType.Vector

Copyright © 2018 www.massapicom. 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.