.trefxpos
The horizontal coordinate of the tied bot, as it published it the previous cycle.
Facts
- Address
- 438
- Name
.trefxpos- Kind
- Sense: the engine writes it for the DNA to read
- Group
- What it feels through a tie (tref*)
- Written by
- The engine, in the forces and collisions phase: it copies the
.xpospublished by the tied bot. You read it in the next cycle, one cycle behind what the other reads of itself. - Cleared
- The engine, when you run out of ties or don't have the tie that
.readtieasks for. - Range
- 0 to 31999
- Mutations
- picked as a read (
*)
It is a copy of the tied bot's .xpos. It runs one cycle further behind than what the partner itself reads in its .xpos: when you read .trefxpos, it has already moved one more step. With .trefypos and your own .xpos and .ypos you know which side of the map it is on.
' Stores in cell 50 the horizontal distance to the tied bot
cond
*.numties 0 >
start
*.trefxpos *.xpos sub abs 50 store
stopTo know where the other is pointing, use .trefaim; for the distance along the tie, .tielen.