Package robocode.control.snapshot

Examples of robocode.control.snapshot.IRobotSnapshot


   *
   * @param event Info about the current state of the battle.
   */
  @Override
  public void onTurnEnded(TurnEndedEvent event) {
    IRobotSnapshot robot = event.getTurnSnapshot().getRobots()[1];
    double xPos = robot.getX();
    double yPos = robot.getY();

    if ((xPos < 40) && (yPos < 40)) {
      visitedUpperLeft = true;
    }
    if ((xPos < 40 && (yPos > (height - 40)))) {
View Full Code Here


  }

  @Override
  public void onTurnEnded(TurnEndedEvent event) {
    super.onTurnEnded(event);
    IRobotSnapshot gh = event.getTurnSnapshot().getRobots()[1];

    switch (event.getTurnSnapshot().getTurn()) {
    case 130:
      test(gh, "130 onTick99\r\n130 onTick30");
      break;
View Full Code Here

  }

  public void onTurnEnded(TurnEndedEvent event) {
    super.onTurnEnded(event);

    IRobotSnapshot robot = event.getTurnSnapshot().getRobots()[0];

    if (event.getTurnSnapshot().getTurn() == 590) {
      String out = robot.getOutputStreamSnapshot();

      test(out, "Robocode.BulletMissedEvent 5");
      test(out, "Robocode.ScannedRobotEvent 100");
      test(out, "Robocode.BulletHitEvent 24");
      test(out, "Robocode.StatusEvent 590");
View Full Code Here

    super.run();
  }

  public void onTurnEnded(final TurnEndedEvent event) {
    super.onTurnEnded(event);                         
    final IRobotSnapshot robot = event.getTurnSnapshot().getRobots()[1];

    if (robot.getOutputStreamSnapshot().contains(
        "tested.robotscs.PrivateConstructor No parameterless constructor defined for this object.")) {
      messaged = true;
    }
    Assert.assertNear(0, robot.getEnergy());
  }
View Full Code Here

  }

  @Override
  public void onTurnEnded(TurnEndedEvent event) {
    super.onTurnEnded(event);
    IRobotSnapshot robot = event.getTurnSnapshot().getRobots()[1];
    final String streamSnapshot = robot.getOutputStreamSnapshot();

    if (streamSnapshot.contains("Win!")) {
      win++;
    }
    if (streamSnapshot.contains("BattleEnded!")) {
View Full Code Here

  }

  public void onTurnEnded(TurnEndedEvent event) {
    super.onTurnEnded(event);

    IRobotSnapshot robot = event.getTurnSnapshot().getRobots()[0];

    if (event.getTurnSnapshot().getTurn() == 590) {
      String out = robot.getOutputStreamSnapshot();

      test(out, "robocode.BulletMissedEvent 5");
      test(out, "robocode.ScannedRobotEvent 100");
      test(out, "robocode.BulletHitEvent 24");
      test(out, "robocode.StatusEvent 590");
View Full Code Here

    super.run();
  }

  public void onTurnEnded(final TurnEndedEvent event) {
    super.onTurnEnded(event);                         
    final IRobotSnapshot robot = event.getTurnSnapshot().getRobots()[1];

    if (robot.getOutputStreamSnapshot().contains("SYSTEM: Is your constructor marked public?")) {
      messaged = true;
    }
    Assert.assertNear(0, robot.getEnergy());
  }
View Full Code Here

  }

  @Override
  public void onTurnEnded(TurnEndedEvent event) {
    super.onTurnEnded(event);
    IRobotSnapshot robot = event.getTurnSnapshot().getRobots()[1];
    final String streamSnapshot = robot.getOutputStreamSnapshot();

    outputBuf.append(streamSnapshot);
  }
View Full Code Here

  }

  @Override
  public void onTurnEnded(TurnEndedEvent event) {
    super.onTurnEnded(event);
    IRobotSnapshot gh = event.getTurnSnapshot().getRobots()[1];

    switch (event.getTurnSnapshot().getTurn()) {
    case 130:
      test(gh, "130 onTick99\n130 onTick30");
      break;
View Full Code Here

  }

  @Override
  public void onTurnEnded(TurnEndedEvent event) {
    super.onTurnEnded(event);
    IRobotSnapshot gh = event.getTurnSnapshot().getRobots()[1];

    switch (event.getTurnSnapshot().getTurn()) {
    case 1:
      test(gh, "3.0");
      break;
View Full Code Here

TOP

Related Classes of robocode.control.snapshot.IRobotSnapshot

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.