下確實在將來萬一有人工作面臨着這樣一個問題:
set breadth-patches patches with[(pycor > (-(breadth)) and pycor < breadth and pxcor = lengthrec) or(pycor > (-(breadth)) and pycor < breadth and pxcor = (-(lengthrec))) ]
set length-patches patches with[(pxcor > (-(lengthrec)) and pxcor < lengthrec and pycor = (-(breadth - 1))) or (pxcor > (-(lengthrec)) and pxcor < lengthrec and pycor = (breadth - 1))]
set gap-patches patches with [pxcor > (gap * (-1)) and pxcor < gap and pycor =(breadth - 1)]
set length-patches length-patches with [not member? self gap-patches]
ask breadth-patches[
sprout-walls 1[set color 2
set size 0.5 set heading 180 fd 0.25
if-else(pxcor < 0)[set heading 90][set heading 270] fd 0.25]
sprout-walls 1[set color 2
set size 0.5 set heading 360 fd 0.25
if-else(pxcor < 0)[set heading 90][set heading 270] fd 0.25]
]
ask length-patches[
sprout-walls 1[set color 2
set size 0.5 set heading 90 fd 0.25
if-else(pycor < 0)[set heading 180][set heading 0] fd 0.25
]
sprout-walls 1[set color 2
set size 0.5 set heading 270 fd 0.25
if-else(pycor < 0)[set heading 180][set heading 0] fd 0.25
]
]
end
那麼,什麼是你的問題?這似乎在你到達實際提問的部分之前就結束了。 – 2014-09-25 13:22:06
@SethTisue請檢查我已經說得更清楚了。 – 2014-09-25 14:48:04
現在的問題更加清晰,但您仍然缺乏自己完成某些工作的部分,而不是隻是要求其他人爲您編寫代碼。試着自己解決;如果您遇到困難,請發佈您編寫的代碼,解釋您正在嘗試採取的方法,並解釋確切地說明您陷入困境的原因以及原因。 *這是一個問題。 – 2014-09-26 04:46:22