Package aima.core.agent.impl

Examples of aima.core.agent.impl.AbstractAgent


  @Test
  public void testAddObjectTwice() {
    Assert.assertEquals(1, env.getAgents().size());
    XYLocation loc = new XYLocation(5, 5);
    AbstractAgent b = new MockAgent();
    env.addObjectToLocation(b, loc);
    Assert.assertEquals(2, env.getAgents().size());

    Assert.assertEquals(loc, env.getCurrentLocationFor(b));
  }
View Full Code Here


  @Test
  public void testGetObjectsAt() {
    XYLocation loc = new XYLocation(5, 7);
    env.moveObjectToAbsoluteLocation(a, loc);
    Assert.assertEquals(1, env.getObjectsAt(loc).size());
    AbstractAgent b = new MockAgent();
    env.addObjectToLocation(b, loc);
    Assert.assertEquals(2, env.getObjectsAt(loc).size());
  }
View Full Code Here

  @Test
  public void testGetObjectsNear() {
    XYLocation loc = new XYLocation(5, 5);
    env.moveObjectToAbsoluteLocation(a, loc);
    AbstractAgent b = new MockAgent();
    AbstractAgent c = new MockAgent();
    Wall w1 = new Wall();

    env.addObjectToLocation(b, new XYLocation(7, 4));
    env.addObjectToLocation(c, new XYLocation(5, 7));
    env.addObjectToLocation(w1, new XYLocation(3, 10));
View Full Code Here

TOP

Related Classes of aima.core.agent.impl.AbstractAgent

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.