MCPcopy Index your code
hub / github.com/NetHack/NetHack / shrink_worm

Function shrink_worm

src/worm.c:174–186  ·  view source on GitHub ↗

* shrink_worm() * * Remove the tail segment of the worm (the starting segment of the list). */

Source from the content-addressed store, hash-verified

172 * Remove the tail segment of the worm (the starting segment of the list).
173 */
174staticfn void
175shrink_worm(int wnum) /* worm number */
176{
177 struct wseg *seg;
178
179 if (wtails[wnum] == wheads[wnum])
180 return; /* no tail */
181
182 seg = wtails[wnum];
183 wtails[wnum] = seg->nseg;
184 seg->nseg = (struct wseg *) 0;
185 toss_wsegs(seg, TRUE);
186}
187
188/*
189 * worm_move()

Callers 3

worm_moveFunction · 0.85
worm_nomoveFunction · 0.85
cutwormFunction · 0.85

Calls 1

toss_wsegsFunction · 0.85

Tested by

no test coverage detected