diff --git a/alrys/alryslib.c b/alrys/alryslib.c index bddf7c3..1128c16 100644 --- a/alrys/alryslib.c +++ b/alrys/alryslib.c @@ -176,7 +176,7 @@ void right(struct STATE *state, double a) double score(double *steps, int size) { int i; - double a, x, y, l; + double a, b, x, y, l; double position[] = {47.5, 43.5, 0.0}; struct STATE state; @@ -194,8 +194,12 @@ double score(double *steps, int size) for(i = 0; i < size; ++i) { - x = steps[0 + i * 2]; - y = steps[1 + i * 2]; + x = steps[0 + i * 4]; + a = steps[1 + i * 4]; + y = steps[2 + i * 4]; + b = steps[3 + i * 4]; + x += a * 1e-14; + y += b * 1e-14; a = atan2(y - position[1], x - position[0]) * 180.0 / M_PI - position[2]; l = hypot(x - position[0], y - position[1]); right(&state, a); diff --git a/alrys/editor.png b/alrys/editor.png index 413b657..4304f14 100644 Binary files a/alrys/editor.png and b/alrys/editor.png differ