|
如题,即如果store中存放有4种entity分别为part1,part2,part3,part4,每次需移动数量分别为4,3,1,1。按下面语句是否可行,不知道怎修改,或者类似语句该如何编写,向大家求救。
6 ?1 ]* O* s( l K, v$ kis
0 S5 k" Y* p+ j; c( a a,b:integer;3 M3 s9 f0 E% o$ E$ U
do
( l, ]5 c* n) [) } if store.cont.name="part1" then
; j/ h0 h: B& E8 _& r for a:=1 to 4 loop$ b0 w. {& [! E) F
store.cont.move;
/ U* _' r; \' f# C next;
; k3 C/ I; u4 W elseif store.cont.name="part2" then* h6 p7 A! W+ d! B
for b:=1to 3 loop4 \- g6 D' k: J5 b: \2 \" e6 ?# |0 }
store.cont.move;" @* Y: e" d$ n+ ~- p
next;/ ^; {0 Z" }0 [2 L; s; r
elseif store.cont.name="part3" then
: ]: ^1 ~ D8 z( I2 j8 u store.cont.move;
+ ~ M, { a+ f elseif store.cont.name="part4" then; Q$ K6 Y l0 j2 a" Q! Z8 A5 ~5 c
store.cont.move;) X8 `; h+ `1 X: b2 a2 Q+ K
end;
9 e- R0 V) y& H" o% j end; |
|