import java.util.Vector; // Notice that I have violated Java convention and have *not* // placed every 2-bit class in its own file. So shoot me. // // // This is just a wrapper to allow me to pass a double, // and then modify its value. // class dblWrap{ public double val; public dblWrap( double ival ){ val = ival; } public void set( double nval ){ val = nval; } public void inc( double ival ){ val += ival; } } // // This represents one or more ships of the // same BR. They will all have the same fate. // repcount determines the multiplicity. // class Scship { double bro; double brc; boolean alive; int deathCause; int repcount; boolean takeahit; public Scship( double br ) { bro = br; brc = br; repcount = 0; alive = true; deathCause = 0; } String generatemsg() { if (repcount==0){ return ""; } String help = repcount+" ships at BR "+bro; if (!alive){ help = help+" was destroyed ("+deathCause+")"; } else { help = help+" went to BR:"+brc; } return help; } public boolean takeahit( dblWrap dest ) { double br2; br2 = brc*brc; if (dest.val=total2ndBR); if (!killall){ SC_PCTLEFT = (1-(dest2/total2ndBR)); } else { SC_PCTLEFT = 0; } //System.out.println("dest2:"+dest2+" total2ndBR:"+total2ndBR); //System.out.println("SC_PCTLEFT:"+SC_PCTLEFT); for (int i=0; i