6 #define headSeg(wp) (wp->body + wp->nsegs) 7 #define xOf(wp) (headSeg(wp)->x) 8 #define yOf(wp) (headSeg(wp)->y) 20 for (bp = this->
body + 1; bp <= hp; bp++) {
79 for (
int sn = this->
nsegs; sn > 0; sn--, bp--)
80 if ((bp->
y == row) && (bp->
x == col))
120 int tsegs = vp->
nsegs;
133 int tsegs = vp->
nsegs;
159 if (victimWormp != 0) {
172 const int dxa[] = { +0, +1, +1, +1, +0, -1, -1, -1 };
173 const int dya[] = { -1, -1, +0, +1, +1, +1, +0, -1 };
176 0, 0, 0, 0, 0, 0, 0, 0,
177 1, 1, 1, 7, 7, 7, 2, 6
188 bp->x = (bp + 1)->x, bp->y = (bp + 1)->y;
226 for (bp++; bp <= hp; bp++) {
Worm * sliceTheVictim(Worm *vp, int vsn)
void shiftBodyDown(Worm *vp, int vsn)
ASOG passive[MAXrow *MAXcol]
int isAt(int row, int col)
ASOG screen[MAXrow *MAXcol]
void createWorm(WormKind type, const char *sy)
#define asog(ptr, row, col)