icfp11/src/path.h

35 lines
570 B
C
Raw Normal View History

2008-07-11 23:40:57 +00:00
#ifndef _PATH_H
#define _PATH_H
#include "control.h"
2008-07-11 23:40:57 +00:00
struct path;
typedef struct path path;
struct command;
typedef struct command command;
2008-07-11 23:40:57 +00:00
struct command{
timestamp ts;
accel_t accel;
turn_t turn;
};
2008-07-11 23:40:57 +00:00
struct path {
GQueue* commands;
};
2008-07-11 23:40:57 +00:00
command *command_new(timestamp ts, accel_t a, turn_t t);
void command_free(command* c);
2008-07-12 10:21:49 +00:00
path *path_new();
2008-07-11 23:40:57 +00:00
void path_execute(trial* t,path* p);
void path_free(path* p);
int path_app_fitseq(path* p, trial* t, timestamp offset, timestamp testtime);
2008-07-12 10:21:49 +00:00
int path_app_target(path* p, trial* t, int offset, int x, int y);
2008-07-11 23:40:57 +00:00
#endif