Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
簡単に言えば、私が苦労しているのは次のとおりです。
if(パッチの色=赤)次にコードを実行します
if any? patches with [pcolor = red] [ print "yes, there is at least one red patch" ]
カメだけがpcolorをチェックできます。したがって、これは機能します。
ask turtles [show pcolor]
ただし、これは機能しません(Observer>プロンプトで入力):
show pcolor