[Home]UnderDark3/Whales.java

Robo Home | UnderDark3 | Changes | Preferences | AllPages

Difference (from prior minor revision) (no other diffs)

Changed: 2,4c2,4


package matt;


import java.lang.String;



<pre>
package matt;
import java.lang.String;

Changed: 35c35


</pre>


Whale.java


package matt;
import java.lang.String;
public class Whale {
    private int MAX_WHALES = 32000;
    public String[] name = new String[MAX_WHALES];
    public int[] targeting = new int[MAX_WHALES];
    public int[] mode = new int[MAX_WHALES];
    public int numWhales;
    
    public Whale() {
        this.numWhales=0;
    }
    
    public void addWhale(String Wname, int Wmode, int Wtargeting){
        this.name[numWhales]=Wname;
        this.targeting[numWhales]=Wtargeting;
        this.mode[numWhales]=Wmode;
        this.numWhales++;
    }
    
    public String getName(int num){
        return this.name[num];
    }
    
    public int getTargeting(int num){
        return this.targeting[num];
    }
    
    public int getMode(int num){
        return this.mode[num];
    }
}

Questions, Comments, or anything else


Robo Home | UnderDark3 | Changes | Preferences | AllPages
Edit text of this page | View other revisions
Last edited July 8, 2005 4:38 EST by UnderDark (diff)
Search: