arrowForDelta returns the connector rune that best represents the direction from one room to another given the raw coordinate delta between them.
(dx, dy, dz int)
| 979 | // arrowForDelta returns the connector rune that best represents the direction |
| 980 | // from one room to another given the raw coordinate delta between them. |
| 981 | func arrowForDelta(dx, dy, dz int) rune { |
| 982 | if dz != 0 { |
| 983 | if dz > 0 { |
| 984 | return '^' |
| 985 | } |
| 986 | return 'v' |
| 987 | } |
| 988 | switch { |
| 989 | case dx == 0 && dy != 0: |
| 990 | return '│' |
| 991 | case dy == 0 && dx != 0: |
| 992 | return '─' |
| 993 | case dx > 0 && dy < 0: |
| 994 | return '╱' |
| 995 | case dx < 0 && dy > 0: |
| 996 | return '╱' |
| 997 | case dx > 0 && dy > 0: |
| 998 | return '╲' |
| 999 | case dx < 0 && dy < 0: |
| 1000 | return '╲' |
| 1001 | } |
| 1002 | return '•' |
| 1003 | } |
| 1004 | |
| 1005 | func (r *mapper) getMapNode(roomId int) *mapNode { |
| 1006 |
no outgoing calls