Piet (programming language): Difference between revisions

Content deleted Content added
Execution: fix n00b formatting
Line 35:
As it executes the program, the interpreter traverses the colour blocks of the program under the following rules:
 
1.# The interpreter finds the edge of the current colour block which is furthest in the direction of the DP. (This edge may be disjoint if the block is of a complex shape.)
2.# The interpreter finds the codel of the current colour block on that edge which is furthest to the CC's direction of the DP's direction of travel. (Visualise this as standing on the program and walking in the direction of the DP)
# The interpreter travels from that codel (Visualiseinto thisthe ascolour standingblock oncontaining the programcodel and walkingimmediately in the direction of the DP).
3. The interpreter travels from that codel into the colour block containing the codel immediately in the direction of the DP.
 
The interpreter continues doing this until the program terminates.