Examples of TurnSnapshot


Examples of net.sf.robocode.battle.snapshot.TurnSnapshot

      robotPeer.startRound(waitMillis, waitNanos);
    }

    Logger.logMessage(""); // puts in a new-line in the log message

    final ITurnSnapshot snapshot = new TurnSnapshot(this, robots, bullets, false);

    eventDispatcher.onRoundStarted(new RoundStartedEvent(snapshot, getRoundNum()));
  }
View Full Code Here

Examples of net.sf.robocode.battle.snapshot.TurnSnapshot

    super.shutdownTurn();
  }

  @Override
  protected void finalizeTurn() {
    eventDispatcher.onTurnEnded(new TurnEndedEvent(new TurnSnapshot(this, robots, bullets, true)));

    super.finalizeTurn();
  }
View Full Code Here

Examples of net.sf.robocode.battle.snapshot.TurnSnapshot

        for (int i = 0; i < recordInfo.turnsInRounds.length; i++) {
          if (recordInfo.turnsInRounds[i] > 0) {
            for (int j = 0; j <= recordInfo.turnsInRounds[i] - 1; j++) {
              try {
                TurnSnapshot turn = (TurnSnapshot) ois.readObject();

                if (j != turn.getTurn()) {
                  throw new Error("Something rotten");
                }

                if (isbin) {
                  turn.stripDetails(options);
                  oos.writeObject(turn);
                } else if (isxml) {
                  turn.writeXml(xwr, options);
                }
              } catch (ClassNotFoundException e) {
                logError(e);
              }
            }
View Full Code Here

Examples of net.sf.robocode.battle.snapshot.TurnSnapshot

          });

          reader.expect("turns", new XmlReader.ListElement() {
            public IXmlSerializable read(XmlReader reader) {
              // prototype
              return new TurnSnapshot();
            }

            public void add(IXmlSerializable child) {
              try {
                me.oos.writeObject(child);
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.