6 |
import gzz.*; |
import gzz.*; |
7 |
import gzz.potion.Expression.*; |
import gzz.potion.Expression.*; |
8 |
|
|
9 |
public class Clone{ |
public class Clone extends AbstractHead implements Command { |
10 |
|
|
11 |
public String getString(Expression[] params, Map context){ |
public Clone() { |
12 |
|
super(new Object[] { |
13 |
return null; |
"Clone ", Types.CELL, " ", Types.PLACE |
14 |
|
}); |
15 |
} |
} |
16 |
|
|
17 |
public void render(Expression[] params, Map context, HChain hchain ){} |
public void execute(List[] params, Map context) { |
18 |
|
for(Iterator i=params[0].iterator(); i.hasNext();) { |
19 |
public Type[] getParams() { |
Cell c = (Cell)i.next(); |
20 |
|
for(Iterator j=params[1].iterator(); j.hasNext();) { |
21 |
return null; |
Place p = (Place)j.next(); |
22 |
|
c.zzclone(); |
23 |
|
p.cell.insert(p.dim, p.dir, c); |
24 |
|
} |
25 |
} |
} |
|
|
|
|
public void execute(List[] params, Map context) { |
|
|
|
|
|
for(Iterator i=params[0].iterator(); i.hasNext();) { |
|
|
|
|
|
Cell c = (Cell)i.next(); |
|
|
|
|
|
for(Iterator j=params[1].iterator(); j.hasNext();) { |
|
|
|
|
|
Place p = (Place)j.next(); |
|
|
c.zzclone(); |
|
|
p.cell.insert(p.dim, p.dir, c); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
26 |
|
} |
27 |
|
} |