/[gzz]/gzz/lava/gzz/potion/potions/Clone.java
ViewVC logotype

Diff of /gzz/lava/gzz/potion/potions/Clone.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by benja, Mon Nov 25 23:52:50 2002 UTC revision 1.2 by benja, Tue Dec 3 01:01:58 2002 UTC
# Line 6  import gzz.vob.linebreaking.HChain; Line 6  import gzz.vob.linebreaking.HChain;
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    }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26