|
|
如题,即如果store中存放有4种entity分别为part1,part2,part3,part4,每次需移动数量分别为4,3,1,1。按下面语句是否可行,不知道怎修改,或者类似语句该如何编写,向大家求救。! k2 ?# J6 x+ _/ g% ~! w
is & f4 ?3 R' [5 y$ {$ k2 A' D
a,b:integer;
9 f9 ?, c7 v9 D5 f9 @# vdo
8 Z) t; s6 Z! Q' o I8 I* I* f if store.cont.name="part1" then
L0 Y7 m/ O, U5 \; ~/ w) r for a:=1 to 4 loop
3 n0 K: _( I6 X1 m store.cont.move;
+ ? h7 l D. v next;
" D0 |: r/ p& r- |/ y S% J2 w elseif store.cont.name="part2" then
( w( b* d* n2 ], j$ M$ C4 @$ ?2 p for b:=1to 3 loop# x1 I. `- ^9 c' z2 B
store.cont.move;. E6 d6 F4 v* T$ Y
next;6 x3 E6 U7 ~9 g e8 ^
elseif store.cont.name="part3" then
5 D% c8 p4 n4 Q `# R store.cont.move;
. ^8 k8 [, {% w7 G elseif store.cont.name="part4" then' \# A" S+ e8 z1 ~9 Q ^" B
store.cont.move;6 `. X7 ]; _ U. W
end;$ V3 v9 ~8 C. x( e1 G
end; |
|