Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NetworkedGraphicsMV3500
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Savage
NetworkedGraphicsMV3500
Commits
67270704
Commit
67270704
authored
3 years ago
by
Brutzman, Don
Browse files
Options
Downloads
Patches
Plain Diff
add comments for student clarity
parent
0e57e8dc
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/src/OpenDis7Examples/ExampleSimulationProgram.java
+7
-5
7 additions, 5 deletions
examples/src/OpenDis7Examples/ExampleSimulationProgram.java
with
7 additions
and
5 deletions
examples/src/OpenDis7Examples/ExampleSimulationProgram.java
+
7
−
5
View file @
67270704
...
@@ -16,7 +16,8 @@ import java.util.ArrayList;
...
@@ -16,7 +16,8 @@ import java.util.ArrayList;
import
java.util.logging.Level
;
import
java.util.logging.Level
;
import
java.util.logging.Logger
;
import
java.util.logging.Logger
;
/** The purpose of this program is to provide an easily modifiable example simulation program. */
/** The purpose of this program is to provide an easily modifiable example simulation program
* that includes DIS-capable entities doing tasks and reporting them. */
public
class
ExampleSimulationProgram
public
class
ExampleSimulationProgram
{
{
/**
/**
...
@@ -39,7 +40,7 @@ public class ExampleSimulationProgram
...
@@ -39,7 +40,7 @@ public class ExampleSimulationProgram
*/
*/
public
ExampleSimulationProgram
()
public
ExampleSimulationProgram
()
{
{
//
U
nder consideration. Constructor is not currently needed.
//
Constructor is u
nder consideration. Constructor is not currently needed.
}
}
/**
/**
...
@@ -238,7 +239,8 @@ public class ExampleSimulationProgram
...
@@ -238,7 +239,8 @@ public class ExampleSimulationProgram
FirePdu
firePdu
=
pduFactory
.
makeFirePdu
();
FirePdu
firePdu
=
pduFactory
.
makeFirePdu
();
// should we customize this munition? what is it for your simulation?
// should we customize this munition? what is it for your simulation?
while
(
loopCount
<
MAX_LOOP_COUNT
)
// loop the simulation while allowed, can set additional conditions to break
// loop the simulation while allowed, programmer can set additional conditions to break out and finish
while
(
loopCount
<
MAX_LOOP_COUNT
)
{
{
String
narrativeMessage1
,
narrativeMessage2
,
narrativeMessage3
;
String
narrativeMessage1
,
narrativeMessage2
,
narrativeMessage3
;
// initialize loop variables
// initialize loop variables
...
@@ -256,8 +258,8 @@ public class ExampleSimulationProgram
...
@@ -256,8 +258,8 @@ public class ExampleSimulationProgram
// etc. etc. your code goes here
// etc. etc. your code goes here
// something happens between my simulation entities, la de da de da...
System
.
out
.
println
(
"... My simulation just did something, no really..."
);
// make your reports: narrative code for CommentPdu here (set all to empty strings to avoid sending)
// make your reports: narrative code for CommentPdu here (set all to empty strings to avoid sending)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment