System.out.println("Entity#"+firePdu.getFiringEntityID().getEntityID()+" is firing "+firePdu.getDescriptor().getMunitionType().getDomain()+"."+firePdu.getDescriptor().getMunitionType().getCountry()+"."+firePdu.getDescriptor().getMunitionType().getCategory()+"."+firePdu.getDescriptor().getMunitionType().getSubCategory()+"."+firePdu.getDescriptor().getMunitionType().getSpecific()+"."+" at Entity#"+firePdu.getTargetEntityID().getEntityID());
if(firePdu.getTargetEntityID().getEntityID()==2){
T62HitsReceived+=1;
if(T62HitsReceived>1){
// The M1 destroyst the T62
System.out.println("M1 Abrams destroys T62 after "+T62HitsReceived+"rounds hit T62 Russian Tank");
narrativeMessage4="Destroyed T62";
destBool=true;
simulationComplete=true;
}
}
}
if(simulationLoopCount>4)// for example
{
simulationComplete=true;
}
entityStatePdu_1.getEntityLocation().setX(entityStatePdu_1.getEntityLocation().getX()+1.0);// 1m per timestep
* @see <a href="https://docs.oracle.com/javase/tutorial/java/javaOO/arguments.html">Passing Information to a Method or a Constructor</a> Arbitrary Number of Arguments
* @param commentType enumeration value describing purpose of the narrative comment
* @param comments String array of narrative comments
* Send EntityState, Fire, Comment PDUs that got updated for this loop, reflecting state of current simulation timestep.
* @see <a href="https://docs.oracle.com/javase/tutorial/java/javaOO/arguments.html">Passing Information to a Method or a Constructor</a> Arbitrary Number of Arguments
* @param entityStatePdu the ESPDU to send, if any
* @param firePdu the FirePDU to send, if any
* @param commentType enumeration value describing purpose of the narrative comment
* @param comments String array of narrative comments
* Main method is first executed when a program instance is loaded.
* @see <a href="https://docs.oracle.com/javase/tutorial/getStarted/application/index.html">Java Tutorials: A Closer Look at the "Hello World!" Application</a>
* @param args command-line arguments are an array of optional String parameters that are passed from execution environment during invocation