|
|

楼主 |
发表于 2008-5-28 11:44:37
|
显示全部楼层
好的,谢谢了
, E4 S# V' f" M
0 g4 K$ f! k5 }7 r8 ?* s问题找到了, # N2 _2 y; `8 C% k$ m0 D9 A% _
. j0 T) B! V" ^
. T& o. p6 Z$ i5 _* R# k
在 To clear 中遗失了一句
' b" @4 \: h* P/ G
; ?5 @: B! @ k( |* A5 j [ ask neighbors with [any? grass-squares-here]
& W. J9 L; `2 c7 D- h7 ?- T" i, f
7 k+ E7 I) s9 {7 {+ M- h0 \ T3 K9 z, l0 m6 r6 i: L5 l& F
$ K' S3 v: J# z7 {; q0 L1 S: O o' ]- D; j* y( O! S
to clear! N8 V) W9 u( W5 L
2 s( ]) }4 X0 L/ e6 Q& }+ _8 s) dask grass-squares-here [die]0 T7 Z, {- j1 J. {) F% O
6 V1 b1 x9 S: `( |. S
ask markers-here [die]
# S3 L8 v9 R% f6 _$ d
: R$ M: K; l0 B6 k) V$ i! U8 @' rlet total count neighbors with [any? mines-here]# O2 [. J9 d7 Z4 i, ]9 v
# ?' {, F& S5 P6 D, N! j" n1 u& I: x3 M
ifelse total > 06 G' L7 u0 d* o) ~
+ A: u$ q0 p, B0 v
[set plabel total]# A; q5 R/ J% _# W# M8 m8 ]: h
; b C' \! l7 F1 a- B* z" f/ V" e
[ ask neighbors with [any? grass-squares-here]0 M ^* N6 n2 e w' m
: z: f+ B1 [$ ^6 `2 d: {
7 N, U+ n8 V, R2 P
[clear]
& U3 G [' b1 I* y6 x1 B+ z2 X, m1 ?
end |
|