icfp12/ovm/task1.c

26 lines
483 B
C
Raw Normal View History

2009-06-26 21:13:17 +00:00
2009-06-26 21:23:39 +00:00
#include "task.h"
static void debug(task_t * task) {
gdouble *o = task->out;
printf(
"Step: %9"G_GUINT64_FORMAT" Score: %5f Fuel: %5f x: %5f y: %5f r: %5f\n",
task->timestamp, o[0], o[1], o[2], o[3], o[4]);
2009-06-26 21:23:39 +00:00
}
static void run(task_t *task) {
debug(task);
}
2009-06-26 21:13:17 +00:00
int main(int argc, char **argv) {
2009-06-26 21:23:39 +00:00
task_t *task;
gdouble score;
UNUSED(argc);
UNUSED(argv);
task = task_new(1002.0, 4, 5);
2009-06-26 21:23:39 +00:00
score = task_run(task, run);
printf("Final Score: %f\n", score);
2009-06-26 21:13:17 +00:00
return 0;
}