War Game

by Chris Thiel, OFMCap (use freely for educational use)

This requires arrays and ArrayLists (During Chapter 7 of Hostmann book is a good time). Reloading will start a new game. To make your own version, I posted some starter code at my apcs wiki

Now you try...

If you want to make your version on a web page:

  1. Export your code as a jar file
  2. Make a html file and add the applet tag
    <applet code="WarGame.class" archive="WarGame.jar" width=600 height=400> </applet>

    or if you made a package "war" like I did:

    <applet code="war.WarGame.class" archive="WarGame.jar" width=600 height=400> </applet>