Libraries‎ > ‎Library‎ > ‎Miscellaneous‎ > ‎

Load patch colours

BehaviourComposer: ignore everything before this.

Begin micro-behaviour:

Begin description:

Load patch colours saved by Print patch colours.

End description

Load patch colours

Begin NetLogo code:

substitute-text-area-for saved-patch-colours Replace this with output from Print patch colourslet x min-pxcorlet y min-pycorforEach constant-list        saved-patch-colours        [let r item 0 ?         let c item 1 ?         repeat r                [ask patch x y [set pcolor c]                 set x x + 1                 if (x > max-pxcor)                    [set y y + 1                     set x 0]]]

End NetLogo code

This updates the patch colours using a list of run-length encoded colour changes produced by the Print patch colours micro-behaviour.
 

BehaviourComposer: ignore everything after this.