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

Function rnddoor

src/sp_lev.c:1147–1153  ·  view source on GitHub ↗

* Choose randomly the state (nodoor, open, closed or locked) for a door */

Source from the content-addressed store, hash-verified

1145 * Choose randomly the state (nodoor, open, closed or locked) for a door
1146 */
1147staticfn int
1148rnddoor(void)
1149{
1150 static int state[] = { D_NODOOR, D_BROKEN, D_ISOPEN, D_CLOSED, D_LOCKED };
1151
1152 return ROLL_FROM(state);
1153}
1154
1155/*
1156 * Select a random trap

Callers 1

lspo_doorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected