|
如题,即如果store中存放有4种entity分别为part1,part2,part3,part4,每次需移动数量分别为4,3,1,1。按下面语句是否可行,不知道怎修改,或者类似语句该如何编写,向大家求救。& V7 y$ U- V+ Y8 Q- F
is
" q; N4 W: a; Z q3 | a,b:integer;
% x+ d& D+ e" F9 l. P+ Q7 X9 Kdo2 I' M4 v- B& u' i+ p( o; s
if store.cont.name="part1" then) z5 s: j: l! ]6 H
for a:=1 to 4 loop
- j) [1 Z3 w( R# u; ?6 \! y' x store.cont.move;: `) s/ V2 ]# m
next;
$ \& ?! r. e8 S" @! I elseif store.cont.name="part2" then7 l! j+ C9 B. e. D
for b:=1to 3 loop
# S. Q A; [8 m store.cont.move;
* V; R6 [0 Y' X( ]3 s next;
1 e! E/ p0 Q% b* C0 y elseif store.cont.name="part3" then
' _' Q" m" Z5 G4 h store.cont.move;- M. @. w: G4 g0 @# W+ E0 v7 `/ H
elseif store.cont.name="part4" then0 H2 j* {( |! @
store.cont.move;6 q$ s& b3 X/ d8 W
end;
* B. x ^7 c' s end; |
|