PatchAhead1
  O> random-seed 223
  O> crt 100 [ fd who ]
  any? turtles with [patch-here != patch-ahead 0] => false
  T> rt 45 * random 8
  any? turtles with [patch-ahead 1 != patch-at dx dy] => false
  any? turtles with [patch-ahead 2 != patch-at (dx * 2) (dy * 2)] => false
  any? turtles with [patch-ahead 3 != patch-at (dx * 3) (dy * 3)] => false
  any? turtles with [patch-ahead 10000 != patch-at (dx * 10000) (dy * 10000)] => false

PatchRightAndAhead
  O> random-seed 37823
  P> sprout 1 [ rt 90 * random 4 fd 0.5 rt 90 fd random-float 1 ]
  T> set size 45 * random 8
  T> set color random-float 10
  T> set label patch-right-and-ahead size color
  T> rt size
  T> fd color
  any? turtles with [label != patch-here and label != nobody ] => false
  any? turtles with [label = nobody and xcor < ( max-pxcor - 0.5 ) and xcor > ( min-pxcor + 0.5 ) and ( ycor < max-pycor - 0.5 ) and ycor > ( min-pycor + 0.5 ) ] => false

PatchLeftAndAhead
  O> random-seed 37823
  P> sprout 1 [ rt 90 * random 4 fd 0.5 rt 90 fd random-float 1 ]
  T> set size 45 * random 8
  T> set color random-float 10
  T> set label patch-left-and-ahead size color
  T> lt size
  T> fd color
  any? turtles with [label != patch-here and label != nobody ] => false
  any? turtles with [label = nobody and xcor < ( max-pxcor - 0.5 ) and xcor > ( min-pxcor + 0.5 ) and ( ycor < max-pycor - 0.5 ) and ycor > ( min-pycor + 0.5 ) ] => false

PatchAtHeadingAndDistanceTorus
  O> __change-topology true true
  O> random-seed 28222
  P> if (patch-at-heading-and-distance 48734 38923) != nobody [ ask (patch-at-heading-and-distance 48734 38923) [ set pcolor red ] ]
  any? patches with [pcolor != red] => false
  P> sprout 1 [ if (patch-at-heading-and-distance 464643 178181) != nobody [ ask (patch-at-heading-and-distance 464643 178181) [ set pcolor blue ] ] ]
  any? patches with [pcolor != blue] => false

PatchAtHeadingAndDistanceBox
  O> __change-topology false false
  O> random-seed 28222
  P> if (patch-at-heading-and-distance 48734 38923) != nobody [ ask (patch-at-heading-and-distance 48734 38923) [ set pcolor red ] ]
  count patches with [pcolor != red] => 121
  P> if (patch-at-heading-and-distance 48734 1 ) != nobody [ ask (patch-at-heading-and-distance 48734 1) [ set pcolor red ] ]
  count patches with [pcolor != red] => 21
  P> sprout 1 [ if (patch-at-heading-and-distance 464643 178181 ) != nobody [ ask (patch-at-heading-and-distance 464643 178181) [ set pcolor blue ] ] ]
  count patches with [pcolor != blue] => 121
  P> sprout 1 [ if (patch-at-heading-and-distance 464643 1 ) != nobody [ ask (patch-at-heading-and-distance 464643 1 ) [ set pcolor blue ] ] ]
  count patches with [pcolor != blue] => 11

PatchAtHeadingAndDistanceCornerOrigin1
  O> resize-world 0 1 0 1
  remove-duplicates [is-patch? patch-at-heading-and-distance 209.99999999 1] of patches => [true]
  remove-duplicates [is-patch? patch-at-heading-and-distance 210.00000001 1] of patches => [true]
  remove-duplicates [is-patch? patch-at-heading-and-distance 210.00000000 1] of patches => [true]

PatchAtHeadingAndDistanceCornerOrigin2
  O> resize-world 0 70 0 40
  remove-duplicates [is-patch? patch-at-heading-and-distance 209.99999999 1] of patches => [true]
  remove-duplicates [is-patch? patch-at-heading-and-distance 210.00000001 1] of patches => [true]
  remove-duplicates [is-patch? patch-at-heading-and-distance 210.00000000 1] of patches => [true]

PatchAtCornerOrigin1
  O> resize-world 0 1 0 1
  remove-duplicates [is-patch? patch-at  0.5000000000000001  1] of patches => [true]
  remove-duplicates [is-patch? patch-at -0.5000000000000001  1] of patches => [true]
  remove-duplicates [is-patch? patch-at -0.5000000000000001 -1] of patches => [true]
  remove-duplicates [is-patch? patch-at  0.5000000000000001 -1] of patches => [true]

PatchAtCornerOrigin2
  O> resize-world 0 1 0 1
  remove-duplicates [is-patch? patch-at  1  0.5000000000000001] of patches => [true]
  remove-duplicates [is-patch? patch-at  1 -0.5000000000000001] of patches => [true]
  remove-duplicates [is-patch? patch-at -1 -0.5000000000000001] of patches => [true]
  remove-duplicates [is-patch? patch-at -1  0.5000000000000001] of patches => [true]

PatchAtCornerOrigin3
  O> resize-world 0 1 0 1
  remove-duplicates [is-patch? patch-at  0.4999999999999999  1] of patches => [true]
  remove-duplicates [is-patch? patch-at -0.4999999999999999  1] of patches => [true]
  remove-duplicates [is-patch? patch-at -0.4999999999999999 -1] of patches => [true]
  remove-duplicates [is-patch? patch-at  0.4999999999999999 -1] of patches => [true]

PatchAtCornerOrigin4
  O> resize-world 0 1 0 1
  remove-duplicates [is-patch? patch-at  1  0.4999999999999999] of patches => [true]
  remove-duplicates [is-patch? patch-at  1 -0.4999999999999999] of patches => [true]
  remove-duplicates [is-patch? patch-at -1 -0.4999999999999999] of patches => [true]
  remove-duplicates [is-patch? patch-at -1  0.4999999999999999] of patches => [true]
