A new feature has been added to javahase in order to provide dynamic layout.
You can use it by specifying a variable instead of an integer in the
position field of an EL file. This variable must have the name of a parameter
specified in the EDL file for the same ENTITY.
This means that the x and y position of the entity depends on the value of the
x and y parameters. If those values change, the entity will move on the screen.
Then with a simple hase code like that :
$body
for (int i=0; i<5; i++) { dir = i%2==0?to_left:to_right; dump_state();
for (int j=0; j<25; j++) { sim_hold(1); if (dir == to_left) x -= 20; else x += 20; dump_state(); }
}
myCar.hase
One will obtain the following result: Frederic Mallet
Last modified: Wed Dec 5 09:59:18 GMT 2001