README
------

The project comprised of two main components: JaDEN translation tool and LiveEdit environment.

Both have been tested to work on DCS machines.

LiveEdit Environment:
---------------------

- navigate to ./JaDEN/LiveEdit in the terminal
- run with: “java -cp javaparser-1.0.8.jar;./bin LiveEdit_Launch” for windows and “java -cp javaparser-1.0.8.jar:./bin LiveEdit_Launch” for unix
- opens up the environment with a blank model
- follow the tutorial in the documentation to build a new model

Loading a model:

- in the input box at the bottom right of the screen enter the expression below and press Evaluate. For the OXO model it initially has a long runtime as it is running minimax for the first move.

LiveEdit.loadModel("JaDEN_OXO");

- A blank model can be made by running: LiveEdit.newModel();

JaDEN Translator:
-----------------

- Load up ./JaDEN/editor.html in Firefox (doesn't work in other browsers locally due to security policies)
- Create new model by clicking file > +.
- Enter name of model + “.java” eg “HelloWorldModel.java”
- Follow the tutorial in the documentation under "Building with JaDEN" to write a simple model
- Translate the model using the translate button when the model is built and the filename appears green.
- Copy the translated code and load up the LiveEdit environment.
- Go to the Compile Model tab, paste in the code
- in the lower input box enter: LiveEdit.compileModel(); and press evaluate.
- A new window with the model should appear.

OXO:
----

The JaDEN code for the OXO game can be found in ./JaDEN/LiveEdit/Models/JaDEN_OXO.java

To run this in the translator, create a new model called JaDEN_OXO.java and paste in the code from the file. Run the process above to compile the model for LiveEdit. It takes a long time to load up the new environment again as it's performing minimax for the first time.
