我正在Logo中开展一个新项目。
我正在尝试制作一个具有不同形状的特定乌龟,以便在整个跑步过程中保持静止;我尝试使用[set xcor and ycor]
,但它没有用。
我该怎么做?
breed [cars car]
breed [gas_stations gas_station]
turtles-own [
speed
movement
time-of-waiting
extra-load
]
to setup
clear-all
ask patches [ setup-road ]
setup-cars
create-gas_stations 1 [
set shape "gas"
set size 5
set color blue
set xcor 25 set ycor 5
]
reset-ticks
end
to setup-road ;; patch procedure
ifelse pycor < 4 and pycor > -4 [set pcolor black ]
[set pcolor green ]
if pycor < 3 and pycor > -3 [ set pcolor gray ]
if pycor > -3 and pycor < 3 and pxcor > 23 and pxcor < 27
[set pcolor yellow ]
end