Class ExpandedCircuitTestParticle
Inheritance
ExpandedCircuitTestParticle
Assembly: .dll
Syntax
public class ExpandedCircuitTestParticle : ParticleAlgorithm
Constructors
ExpandedCircuitTestParticle(Particle)
Declaration
public ExpandedCircuitTestParticle(Particle p)
Parameters
Fields
moveDir
Declaration
public ParticleAttribute<Direction> moveDir
Field Value
placementHead
Declaration
public ParticleAttribute<PSPlacementMode> placementHead
Field Value
placementTail
Declaration
public ParticleAttribute<PSPlacementMode> placementTail
Field Value
Properties
GenerationMethod
Declaration
public static string GenerationMethod { get; }
Property Value
Name
Declaration
public static string Name { get; }
Property Value
PinsPerEdge
The number of pins on each edge.
This number must be the same constant for all
particles.
Declaration
public override int PinsPerEdge { get; }
Property Value
Overrides
Methods
ActivateBeep()
This is the second part of the main activation logic of the
particle. It is called exactly once in each round, after the
movements scheduled in ActivateMove() have been
executed, and should contain the algorithm code that
implements the look-compute-beep cycle.
Inside of this method, particles are allowed to change their
pin configuration and send beeps and messages on the updated
configuration.
Note that beeps and messages sent in the current round will
be readable in both the ActivateMove() and
ActivateBeep() calls in the next round.
Declaration
public override void ActivateBeep()
Overrides
ActivateMove()
This is one part of the main activation logic of the particle.
It is called exactly once in each round and should contain the
algorithm code that implements the look-compute-move cycle.
After the movements are executed, ActivateBeep()
is called within the same round.
Inside of this method, particles are allowed to release bonds,
define which bonds should be marked, and schedule movements.
Only the last movement operation scheduled in this method will
be applied.
Declaration
public override void ActivateMove()
Overrides
BeepRandom(PinConfiguration)
Declaration
private void BeepRandom(PinConfiguration pc)
Parameters
Init(Direction, PSPlacementMode, PSPlacementMode)
Declaration
public void Init(Direction moveDir = Direction.NONE, PSPlacementMode placementHead = PSPlacementMode.NONE, PSPlacementMode placementTail = PSPlacementMode.NONE)
Parameters
SetPlacement(PinConfiguration, PSPlacementMode, bool)
Declaration
private void SetPlacement(PinConfiguration pc, PSPlacementMode placementMode, bool head)
Parameters
SetRandomPC(bool)
Declaration
private void SetRandomPC(bool expanded)
Parameters
Type |
Name |
Description |
bool |
expanded |
|