Search Results for

    Show / Hide Table of Contents

    Interface IReplayHistory

    Interface defining methods for objects that store a history and that can be reset to a previous point in time.

    Time is simply measured in rounds. The round number equals the number of simulation rounds executed until that point in time.

    By default, the object's state evolves with the rounds that are simulated. If the tracking marker is reset to a particular round, the object reverts to its previous state recorded for that round. In this state, the object cannot be part of the simulation anymore, but the marker can be used to step through the recorded rounds or jump to any valid round. As soon as the state tracking is reactivated, the marker will follow the latest recorded state and the object will evolve with the simulation again.

    Namespace: AS2.Sim
    Assembly: .dll
    Syntax
    public interface IReplayHistory

    Methods

    | Edit this page View Source

    ContinueTracking()

    Resets the marker to track the latest recorded state and to continue evolving as the simulation progresses.

    Declaration
    void ContinueTracking()
    | Edit this page View Source

    CutOffAtMarker()

    Deletes all recorded states after the currently marked round.

    Declaration
    void CutOffAtMarker()
    | Edit this page View Source

    GetFirstRecordedRound()

    Returns the first round for which a state has been recorded.

    The object cannot be reset to a time before this round.

    Declaration
    int GetFirstRecordedRound()
    Returns
    Type Description
    int

    The first round for which a state has been recorded.

    | Edit this page View Source

    GetMarkedRound()

    Returns the round that is currently marked.

    If the marker is tracking the object's state, this round will increase every time a new value is recorded.

    Declaration
    int GetMarkedRound()
    Returns
    Type Description
    int

    The round that is currently marked.

    | Edit this page View Source

    IsTracking()

    Checks whether the object is currently tracking the latest recorded state.

    If the object is not tracking, it may not be usable in the regular way until the tracking is continued.

    Declaration
    bool IsTracking()
    Returns
    Type Description
    bool

    Whether the marker currently tracks the latest recorded state.

    | Edit this page View Source

    SetMarkerToRound(int)

    Sets the tracking marker to the specified round, restores the state recorded for that point in time, and stops the marker from tracking the latest round.

    The target round must not be earlier than the round returned by GetFirstRecordedRound().

    Declaration
    void SetMarkerToRound(int round)
    Parameters
    Type Name Description
    int round

    The round to which the tracking marker should be set.

    | Edit this page View Source

    ShiftTimescale(int)

    Shifts all records as well as the marker by the specified amount of rounds.

    Declaration
    void ShiftTimescale(int amount)
    Parameters
    Type Name Description
    int amount

    The number of rounds to add to each entry. May be negative.

    | Edit this page View Source

    StepBack()

    Moves the marker one round back and restores the object's recorded state for that round. Also stops it from tracking the last round if it was still tracking.

    Must not be called when the marker is already at the first recorded round.

    Declaration
    void StepBack()
    | Edit this page View Source

    StepForward()

    Moves the marker one round forward and restores the object's recorded state for that round. Also stops it from tracking the last round if it was still tracking.

    May be ineffective if the object has a hard limit on the last recorded round.

    Declaration
    void StepForward()
    • Edit this page
    • View Source
    In this article
    Back to top AmoebotSim 2.0 Documentation v1.11
    Copyright © 2025 AmoebotSim 2.0 Authors
    Generated by DocFX