Package net.javlov.world.phys2d

Examples of net.javlov.world.phys2d.Phys2DBody


  }
 
  protected void makeWorld() {
    world = new GridLimitedOptionsWorld(15, 18, cellwidth, cellheight);
   
    Body landmark = new Phys2DBody( new StaticBox(cellwidth, cellheight), 10, true );
    landmark.setLocation(4.5*cellwidth, 14.5*cellheight);
    landmark.setType(Body.UNDEFINED);
    world.addFixedBody(landmark);
   
    landmark = new Phys2DBody( new StaticBox(cellwidth, cellheight), 10, true );
    landmark.setLocation(4.5*cellwidth, 8.5*cellheight);
    landmark.setType(Body.UNDEFINED);
    world.addFixedBody(landmark);
   
    landmark = new Phys2DBody( new StaticBox(cellwidth, cellheight), 10, true );
    landmark.setLocation(10.5*cellwidth, 8.5*cellheight);
    landmark.setType(Body.UNDEFINED);
    world.addFixedBody(landmark);
   
    landmark = new Phys2DBody( new StaticBox(cellwidth, cellheight), 10, true );
    landmark.setLocation(10.5*cellwidth, 2.5*cellheight);
    landmark.setType(Body.UNDEFINED);
    world.addFixedBody(landmark);
   
    rf = new GridRewardFunction();
    world.setRewardFunction(rf);
    world.addCollisionListener(rf);
View Full Code Here

TOP

Related Classes of net.javlov.world.phys2d.Phys2DBody

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.