+static int str_end(const char *);
+static int score(struct ship *, struct ship *, char *, size_t, int);
+static void move_ship(struct ship *, const char *, unsigned char *,
+ short *, short *, int *);
+static void try(struct ship *f, struct ship *t,
+ char *command, size_t commandmax, char *temp, size_t tempmax,
+ int ma, int ta, bool af, int vma, int dir, int *high,
+ int rakeme);
+static void rmend(char *);
+
+const int dtab[] = {0,1,1,2,3,4,4,5}; /* diagonal distances in x==y */
+
+void
+thinkofgrapples(void)