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

Function random_wdir

src/sp_lev.c:4577–4582  ·  view source on GitHub ↗

Choose a single random W_* direction. */

Source from the content-addressed store, hash-verified

4575
4576/* Choose a single random W_* direction. */
4577coordxy
4578random_wdir(void)
4579{
4580 static const coordxy wdirs[4] = { W_NORTH, W_SOUTH, W_EAST, W_WEST };
4581 return wdirs[rn2(4)];
4582}
4583
4584static schar floodfillchk_match_under_typ;
4585

Callers 2

selection_do_growFunction · 0.85
lspo_mazewalkFunction · 0.85

Calls 1

rn2Function · 0.85

Tested by

no test coverage detected