Search Results for

    Show / Hide Table of Contents

    Class BinAttributeBool

    Binary encoded attribute for bool values. Each bool is represented by a single bit.

    Inheritance
    object
    BinAttribute<bool>
    BinAttributeBool
    Namespace: AS2.Subroutines.BinStateHelpers
    Assembly: .dll
    Syntax
    public class BinAttributeBool : BinAttribute<bool>

    Constructors

    | Edit this page View Source

    BinAttributeBool(ParticleAttribute<int>, int)

    Creates a new attribute wrapper referencing the given state attribute int.

    Declaration
    public BinAttributeBool(ParticleAttribute<int> attr, int idx)
    Parameters
    Type Name Description
    ParticleAttribute<int> attr

    The attribute storing the integer that contains this value as a subset of bits.

    int idx

    The bit index at which the encoding of this value starts.

    Methods

    | Edit this page View Source

    GetCurrentValue()

    Returns the latest value.

    Declaration
    public override bool GetCurrentValue()
    Returns
    Type Description
    bool

    The value decoded from the int's latest value.

    Overrides
    BinAttribute<bool>.GetCurrentValue()
    | Edit this page View Source

    GetValue()

    Returns the value from the beginning of the current round.

    Declaration
    public override bool GetValue()
    Returns
    Type Description
    bool

    The value decoded from the int's snapshot value.

    Overrides
    BinAttribute<bool>.GetValue()
    | Edit this page View Source

    SetValue(bool)

    Writes a new value to the state integer.

    Declaration
    public override void SetValue(bool value)
    Parameters
    Type Name Description
    bool value

    The new value to be written.

    Overrides
    BinAttribute<bool>.SetValue(bool)
    • 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