Package net.sf.robocode.battle.snapshot

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


    super.shutdownTurn();
  }

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

    super.finalizeTurn();
  }
View Full Code Here

        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

          });

          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

Related Classes of net.sf.robocode.battle.snapshot.TurnSnapshot

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.