Namespace AS2.Subroutines.BinStateHelpers
Classes
BinAttributeBitField
Binary encoded attribute for arrays of up to 32 bool values. Each bool is represented by a single bit. If the given start index is greater than 0, the maximum number of bits is reduced
BinAttributeBool
Binary encoded attribute for bool values. Each bool is represented by a single bit.
BinAttributeDirection
Binary encoded attribute for Direction values.
A direction is encoded in 3 bits and the bits 000
represent
NONE. Only cardinal directions are encoded.
BinAttributeEnum<T>
A binary encoded attribute for arbitrary enums. Make sure to
provide enough bits to encode the enum as an integer. Note that
the enum value represented by 0
will be the default value.
BinAttributeInt
A binary encoded attribute for integers using less space than a full int.
BinAttribute<T>
Lightweight attribute wrapper representing a value that is stored
in a single integer attribute, encoded in binary using a subset of bits.
A standard int
has 32 bits, which can be used to encode multiple
different values, especially since amoebot memory is limited and will
never use integer values this large.