<?xml version="1.0" encoding="utf-8"?>
<model version="NetLogo 7.1.0-alpha1" snapToGrid="false">
  <code><![CDATA[
;; Test file for repr-tool.nlm,
;; under the same license (see repr-tool.nlm)

import [repr] from repr-tool


globals [
  a-turtle
  a-link
  a-patch
  a-string
  a-list
]


to setup
  clear-all
  random-seed 202603
  create-turtles 2 [
    setxy random-pxcor random-pycor
  ]
  ask turtle 0 [
    set a-turtle self
    create-link-with turtle 1 [
      set a-link self
    ]
    set a-patch patch-here
  ]
  set a-string "1 2"
  set a-list [3 "4" 5 "6"]
  reset-ticks
end


to go
  do-test
  print ""
  show a-list
  print a-list
  print repr a-list
  user-message repr a-list
  tick
end


to do-test
  let test random 10
  if test = 0 [
    set a-list [3 "4" 5 "6"]
  ]
  if test = 1 [
    set a-list fput a-string a-list
  ]
  if test = 2 [
    set a-list lput a-turtle a-list
  ]
  if test = 3 [
    set a-list fput a-link a-list
  ]
  if test = 4 [
    set a-list lput a-patch a-list
  ]
  if test = 5 [
    set a-list fput repr a-list a-list
  ]
  if test = 6 [
    set a-list (list a-list 3 "4")
  ]
  if test = 7 [
    set a-list (list 1 "2" a-list)
  ]
  if test = 8 [
    set a-list (list a-list a-list)
  ]
  if test = 9 [
    set a-list ["\n" "\t" "\"" "\\"]
  ]
end
]]></code>
  <widgets>
    <view x="93" wrappingAllowedX="true" y="10" frameRate="30.0" minPycor="-16" height="433" showTickCounter="true" patchSize="13.0" fontSize="10" wrappingAllowedY="true" width="433" tickCounterLabel="ticks" maxPycor="16" updateMode="0" maxPxcor="16" minPxcor="-16"></view>
    <button x="21" y="10" height="40" disableUntilTicks="false" forever="false" kind="Observer" width="63">setup</button>
    <button x="21" y="57" height="40" disableUntilTicks="false" forever="true" kind="Observer" width="63">go</button>
  </widgets>
  <info><![CDATA[

]]></info>
  <turtleShapes>
    <shape name="default" rotatable="true" editableColorIndex="0">
      <polygon color="-1920102913" filled="true" marked="true">
        <point x="150" y="5"></point>
        <point x="40" y="250"></point>
        <point x="150" y="205"></point>
        <point x="260" y="250"></point>
      </polygon>
    </shape>
  </turtleShapes>
  <linkShapes>
    <shape name="default" curviness="0.0">
      <lines>
        <line x="-0.2" visible="false">
          <dash value="0.0"></dash>
          <dash value="1.0"></dash>
        </line>
        <line x="0.0" visible="true">
          <dash value="1.0"></dash>
          <dash value="0.0"></dash>
        </line>
        <line x="0.2" visible="false">
          <dash value="0.0"></dash>
          <dash value="1.0"></dash>
        </line>
      </lines>
      <indicator>
        <shape name="link direction" rotatable="true" editableColorIndex="0">
          <line endX="90" startY="150" marked="true" color="-1920102913" endY="180" startX="150"></line>
          <line endX="210" startY="150" marked="true" color="-1920102913" endY="180" startX="150"></line>
        </shape>
      </indicator>
    </shape>
  </linkShapes>
  <previewCommands>setup repeat 75 [ go ]</previewCommands>
</model>
