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

Function directionname

src/cmd.c:4312–4323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4310}
4311
4312const char *
4313directionname(int dir)
4314{
4315 static NEARDATA const char *const dirnames[N_DIRS_Z] = {
4316 "west", "northwest", "north", "northeast", "east",
4317 "southeast", "south", "southwest", "down", "up",
4318 };
4319
4320 if (dir < 0 || dir >= N_DIRS_Z)
4321 return "invalid";
4322 return dirnames[dir];
4323}
4324
4325int
4326isok(coordxy x, coordxy y)

Callers 3

landing_spotFunction · 0.85
move_out_of_boundsFunction · 0.85
dxdy_to_dist_descrFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected