MCPcopy Create free account
hub / github.com/NetHack/NetHack / trap_sanity_check

Function trap_sanity_check

src/trap.c:7197–7209  ·  view source on GitHub ↗

sanity check traps */

Source from the content-addressed store, hash-verified

7195
7196/* sanity check traps */
7197void
7198trap_sanity_check(void)
7199{
7200 struct trap *ttmp = gf.ftrap;
7201
7202 while (ttmp) {
7203 if (!isok(ttmp->tx, ttmp->ty))
7204 impossible("trap sanity: location (%i,%i)", ttmp->tx, ttmp->ty);
7205 if (ttmp->ttyp <= NO_TRAP || ttmp->ttyp >= TRAPNUM)
7206 impossible("trap sanity: type (%i)", ttmp->ttyp);
7207 ttmp = ttmp->ntrap;
7208 }
7209}
7210
7211/*trap.c*/

Callers 1

sanity_checkFunction · 0.85

Calls 2

isokFunction · 0.85
impossibleFunction · 0.70

Tested by

no test coverage detected