Search Results for

    Show / Hide Table of Contents

    Class UnrollingTestInitializer

    Inheritance
    object
    InitializationMethod
    UnrollingTestInitializer
    Namespace: AS2.Algos.SuboracleTest
    Assembly: .dll
    Syntax
    public class UnrollingTestInitializer : InitializationMethod

    Constructors

    | Edit this page View Source

    UnrollingTestInitializer(ParticleSystem)

    Declaration
    public UnrollingTestInitializer(ParticleSystem system)
    Parameters
    Type Name Description
    ParticleSystem system

    Methods

    | Edit this page View Source

    DrawSpiralFromString(Vector2Int, Direction, bool, string)

    Helper function to draw a spiral based on a string input, where the numbers indicate the length of each segment and the direction changes after each segment.

    Declaration
    private (Direction, List<Vector2Int>) DrawSpiralFromString(Vector2Int startPos, Direction mainDir, bool clockwise, string spiral)
    Parameters
    Type Name Description
    Vector2Int startPos

    The starting position of the spiral

    Direction mainDir

    The starting direction of the spiral

    bool clockwise

    Whether the spiral should be clockwise or counterclockwise

    string spiral

    The string representing the spiral

    Returns
    Type Description
    (Direction, List<Vector2Int>)

    A tuple containing the final direction and the list of generated positions

    | Edit this page View Source

    Generate(int, int, CardinalDirection, bool, float, bool, string)

    Declaration
    public void Generate(int unrollCount = 0, int numParticles = 100, UnrollingTestInitializer.CardinalDirection startDir = CardinalDirection.E, bool clockwise = true, float turnProb = 0.35, bool allowAcute = false, string segmentLengths = "")
    Parameters
    Type Name Description
    int unrollCount
    int numParticles
    UnrollingTestInitializer.CardinalDirection startDir
    bool clockwise
    float turnProb
    bool allowAcute
    string segmentLengths
    | Edit this page View Source

    GenerateSpiralPositions(Vector2Int, Direction, int, bool, float, bool)

    Helper function to generate a spiral randomly based on the specified parameters

    Declaration
    private (Direction, List<Vector2Int>) GenerateSpiralPositions(Vector2Int startPos, Direction mainDir, int numPositions, bool clockwise, float turnProb, bool allowAcute)
    Parameters
    Type Name Description
    Vector2Int startPos

    The starting position of the spiral

    Direction mainDir

    The starting direction of the spiral

    int numPositions

    The number of positions to generate

    bool clockwise

    Whether the spiral should be clockwise or counterclockwise

    float turnProb

    The probability of turning

    bool allowAcute

    Whether to allow acute turns

    Returns
    Type Description
    (Direction, List<Vector2Int>)

    A tuple containing the final direction and the list of generated positions

    • Edit this page
    • View Source
    In this article
    Back to top AmoebotSim 2.0 Documentation v1.12
    Copyright © 2025 AmoebotSim 2.0 Authors
    Generated by DocFX