home
·
contact
·
privacy
projects
/
plomrogue
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
sorted_winttogle_and_activate() now sufficiently tolerates toggle_order_and_activate...
[plomrogue]
/
src
/
yx_uint16.c
1
/* yx_uint16.c */
2
3
#include "yx_uint16.h"
4
#include <stdint.h> /* for uint8_t, uint16_t */
5
6
7
8
extern uint8_t yx_uint16_cmp(struct yx_uint16 * a, struct yx_uint16 * b)
9
{
10
if (a->y == b->y && a->x == b->x)
11
{
12
return 1;
13
}
14
return 0;
15
}
16
17
18
19
extern struct yx_uint16 mv_yx_in_dir(char d, struct yx_uint16 yx)
20
{
21
if (d == 'N')
22
{
23
yx.y--;
24
}
25
else if (d == 'E')
26
{
27
yx.x++;
28
}
29
else if (d == 'S')
30
{
31
yx.y++;
32
}
33
else if (d == 'W')
34
{
35
yx.x--;
36
}
37
return yx;
38
}