@@ -0,0 +1,2681 @@
+package greycat.samples.Battleground;%0A%0Aimport greycat.Type;%0Aimport greycat.Graph;%0Aimport greycat.GraphBuilder;%0Aimport greycat.Node;%0A%0A/**%0A * Created by Quentin on 18/05/2017.%0A */%0Apublic class MinimalClasses %7B%0A%0A%0A    public static void main(String%5B%5D args) %7B%0A%0A        //Create a minimal graph with the default configuration%0A        Graph g = new GraphBuilder().build();%0A%0A        //Connect the graph%0A        g.connect(isConnected -%3E %7B%0A            //Display that the graph database is connected!%0A            System.out.println(%22Connected : %22 + isConnected);%0A%0A            long timepoint_0 = 0;  //the timestamp is a long and represents the time concept%0A%0A%0A%0A            Node target1 = g.newNode(0, timepoint_0); //the second param is the time%0A            target1.set(%22id%22, Type.STRING, %222%22);%0A            target1.set(%22name%22, Type.STRING, %22Target1%22);%0A            target1.set(%22Resilience%22, Type.DOUBLE, 5.0); //set the value of the sensor%0A%0A%0A            Node tank1 = g.newNode(0, timepoint_0); //the second param is the time%0A            tank1.set(%22id%22, Type.STRING, %221%22);%0A            tank1.set(%22name%22, Type.STRING, %22Tank1%22);%0A            tank1.set(%22Power%22, Type.DOUBLE, 3.0); //set the value of the sensor%0A%0A%0A%0A            long timepoint_1 = 100;%0A            tank1.travelInTime(timepoint_1, (Node tank1T1) -%3E %7B%0A                tank1T1.set(%22Power%22, Type.DOUBLE, 8.0); //update the value of the time now%0A                //Display the value at time 0%0A                System.out.println(%22T0:%22 + tank1.toString()); //print T0:%7B%22world%22:0,%22time%22:0,%22id%22:1,%22id%22:%224494F%22,%22name%22:%22sensor0%22,%22value%22:0.5%7D%0A                System.out.println(%22T0:%22 + target1.toString());%0A%0A                //Display the value at time now%0A                System.out.println(%22T1:%22 + tank1T1.toString()); //print T1:%7B%22world%22:0,%22time%22:100,%22id%22:1,%22id%22:%224494F%22,%22name%22:%22sensor0%22,%22value%22:21.3%7D%0A%0A                tank1.addToRelation(%22can_destroy%22, target1); //add the sensor0 to the relation sensors of room0%0A%0A                tank1.relation(%22can_destroy%22, (Node%5B%5D can_destroy) -%3E %7B%0A                    System.out.println(%22Relationship can destroy :%22);%0A                    for (Node can_des : can_destroy) %7B%0A                        System.out.println(%22%5Ct%22 + can_des.toString());%0A                    %7D%0A                %7D);%0A%0A%0A%0A                long timepoint_2= 200;%0A                tank1.travelInTime(timepoint_2, (Node tank1T2) -%3E%7B%0A%0A                    tank1T2.set(%22Power%22, Type.DOUBLE, 10.0); //update the value of the time now%0A                    System.out.println(%22T2:%22 + tank1T2.toString()); //prints T2:%7B%22world%22:0,%22time%22:50,%22id%22:1,%22id%22:%224494F%22,%22name%22:%22sensor0%22,%22value%22:0.5%7D%0A                %7D);%0A%0A%0A%0A            %7D);%0A%0A        %7D);%0A    %7D%0A%0A%0A%0A%0A%7D%0A

Test tank/target