diff options
author | Adam Spragg <adam@spra.gg> | 2023-01-12 14:16:00 +0000 |
---|---|---|
committer | Adam Spragg <adam@spra.gg> | 2023-01-12 14:16:00 +0000 |
commit | 5073c9d007896eb822e21d49745459be22606ccc (patch) | |
tree | 3e21c0cc774f3a49eefbb977d1f38e26e3cdfd13 /22.c | |
parent | 19625d5e7f22c64eca9c79c13f8eae9fbd8e3934 (diff) |
Puzzle 22: Simplify because map_elem() never returns '\n'
Diffstat (limited to '22.c')
-rw-r--r-- | 22.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -187,7 +187,7 @@ elf_move(struct elf * elf, struct map const * map, int distance) elem = map_elem(map, newelf.x, newelf.y); // Just keep going until we wrap around to a non-blank position - while (elem == ' ' || elem == '\n') { + while (elem == ' ') { newelf.x = modulo(newelf.x + dx, map->cols); newelf.y = modulo(newelf.y + dy, map->rows); elem = map_elem(map, newelf.x, newelf.y); |