设为首页收藏本站

最大的系统仿真与系统优化公益交流社区

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7494|回复: 4

[原创] 如何让海龟能够在移动的过程中辨识出不同的瓦片来!

  [复制链接]
发表于 2008-6-14 19:31:07 | 显示全部楼层 |阅读模式
例如:我想在让海龟移动的过程中有选择的移动,首先如果能够移动到红色的瓦片上去就先到红色的上面去,如果不能就移动到蓝色的瓦片上去,玩片分两种颜色,红色和蓝色!
发表于 2009-8-4 16:46:48 | 显示全部楼层
starlogo 是高手,赞一个!
发表于 2009-10-18 10:18:10 | 显示全部楼层
前面,还是用ifelse语句吧。先看是否有红色的瓦片,有的话就移到一个上面去,如果没有,就移到蓝色上面去,应该没问题。

评分

参与人数 1仿真币 +10 收起 理由
苘苘 + 10

查看全部评分

发表于 2010-5-9 20:07:31 | 显示全部楼层
to go
9 e) M! x) h5 [- v) l; f; Cask turtles [if any? patches with [pcolor = red and not any? turltes-here]9 ^  C6 c8 v9 |. b7 l' r% U
% s9 h# v' b, s1 Q9 ?
[move-to one-of patches with [pcolor = red and not any? turtles-here]]
2 X; z( i; _/ d( ?  [  u[move-to one-of patches with [pcolor = blue and not any? turtles-here]]' R) B5 h2 b7 m8 t
end

评分

参与人数 1仿真币 +10 收起 理由
苘苘 + 10

查看全部评分

发表于 2011-4-10 14:40:45 | 显示全部楼层
赞一下高手
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|SimulWay 道于仿真   

GMT+8, 2025-9-2 10:27 , Processed in 0.020465 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表