|
楼主 |
发表于 2008-5-28 11:44:37
|
显示全部楼层
好的,谢谢了
6 [' u# G9 ^: B$ W4 U( u* y7 j) u' P2 s; K# {
问题找到了, ! i! q- b: ^" T+ @! @% O; R
; ?3 X; f2 |3 U
8 u( f D' J9 r+ g5 O J在 To clear 中遗失了一句
" E& F4 ~+ j) w' f( c: p7 P$ g2 k, o% T
1 H; X' g1 g8 p, Q# C [ ask neighbors with [any? grass-squares-here]
4 `+ X; i0 ^8 |4 g6 j
2 \! ?6 B9 A; ]! _
; f0 h7 p) ^# s+ r/ \
7 R4 T% Y$ B4 p8 X. _; k4 m6 ~ F
to clear3 x$ Q+ \9 }- |+ u, f, U1 K
% @( `- O1 Z+ w' }
ask grass-squares-here [die]2 c5 C& T" z& B
9 F: B1 ^, Q! {
ask markers-here [die]5 Z6 O( L; R0 m9 f0 s+ J
, z0 ]1 |- M* ^+ Olet total count neighbors with [any? mines-here]9 l3 I( P, t4 `+ f Z! |( I
# |, a( y! |" F1 O3 V
ifelse total > 0) W. c9 N" O. C: `
8 [3 Z2 Q6 A7 Z" U$ @# R
[set plabel total]
; T+ \: Z. ?7 N8 d2 H
( Z$ g* [1 o- C; r( y [ ask neighbors with [any? grass-squares-here]
' [5 A. c, a7 a, Y9 j& d/ _- A* q! t0 w& `( q4 f
! k% R+ d& G( j2 s+ D0 e2 M[clear]
7 K5 L2 }' e' q4 F' x( X1 } F
. b" y- N1 U, J" P. }6 s( Dend |
|