/* SealScript test app */
#include "object.h"
#include "sscript.h"

main()
{
  p_sscript ss = sscript_init(malloc(sizeof(t_sscript)));
  ss->set_code(ss, "");
  /*
PRINT \"Waiting for second to change...\"
TIME time
SET old_time, time
LOOP_BEGIN_1:
  TIME time
  IF time <> old_time : GOTO LOOP_END_1 : END
  GOTO LOOP_BEGIN_1
LOOP_END_1:
PRINT \"Ok, let's test the engine...\"
SET i, 1
SET times, 1
LOOP_TIMES:
  PRINT \"Loop \", times
  TIME time
  SET old_time, time
  LOOP_BEGIN:
    TIME time
    PRINT \"Let's make something not so good to speed down a bit the test for better result\"
    ADD i, 1
    IF time <> old_time : GOTO LOOP_END : END
    GOTO LOOP_BEGIN
  LOOP_END:
  ADD times, 1
  IF times = 6 : GOTO LOOP_TIMES_END : END
  GOTO LOOP_TIMES
LOOP_TIMES_END:
DIV i, 5 : PRINT \"Speed is \", i, \" commands per second.\"
");
*/
  ss->compile(ss);
  ss->execute(ss);
  free(ss);
}

