[Home]UnderDark3/Whales.java

Robo Home | UnderDark3 | Changes | Preferences | AllPages

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 2:38 EST by UnderDark (diff)
Search: