home
·
contact
·
privacy
projects
/
plomrogue
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9ccef1c
)
Re-styled code.
author
Christian Heller
<c.heller@plomlompom.de>
Wed, 21 Aug 2013 19:10:05 +0000
(21:10 +0200)
committer
Christian Heller
<c.heller@plomlompom.de>
Wed, 21 Aug 2013 19:10:05 +0000
(21:10 +0200)
src/yx_uint16.c
patch
|
blob
|
history
diff --git
a/src/yx_uint16.c
b/src/yx_uint16.c
index 2d7503ba904381c87136e1df8b3f288fdf0e622b..4898c4ab6529ef1930754854ea1b4aecfacbd0a7 100644
(file)
--- a/
src/yx_uint16.c
+++ b/
src/yx_uint16.c
@@
-9,9
+9,13
@@
extern char yx_uint16_cmp(struct yx_uint16 a, struct yx_uint16 b)
{
if (a.y == b.y && a.x == b.x)
+ {
return 1;
+ }
else
+ {
return 0;
+ }
}
@@
-19,12
+23,20
@@
extern char yx_uint16_cmp(struct yx_uint16 a, struct yx_uint16 b)
extern struct yx_uint16 mv_yx_in_dir(enum dir d, struct yx_uint16 yx)
{
if (d == NORTH)
+ {
yx.y--;
+ }
else if (d == EAST)
+ {
yx.x++;
+ }
else if (d == SOUTH)
+ {
yx.y++;
+ }
else if (d == WEST)
+ {
yx.x--;
+ }
return yx;
}