#include "ctap.h"
int main(void) {
- int hex, start, dist;
+ struct HL_hex hex, start;
+
+ int dist;
int x, y, i;
plan(294);
for (x = -3 ; x <= 3; x++) {
for (y = -3 ; y <= 3; y++) {
- start = HL_cantor_xy(x, y);
+ start = HL_hex_xy(x, y);
for (i = 0; i < 6; i++) {
hex = HL_adjhex(start, i);
dist = HL_distance(hex, start);
- ok(dist == 1,
+ is_int((long)dist, 1L,
"%d, %d direction %d distance one",
x, y, i);
}