diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2019-02-22 17:25:59 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2019-02-22 17:25:59 -0500 |
commit | 26fbd8c1edaf94513d9750681edbe449b699efe4 (patch) | |
tree | 3356e61d3eca5eda067169a2c584616a49d8e5a5 /src/direction.h | |
parent | d9c201cbf2fbfe315137e141d886a9bbfa6794ba (diff) | |
download | dispatcher-26fbd8c1edaf94513d9750681edbe449b699efe4.tar.gz dispatcher-26fbd8c1edaf94513d9750681edbe449b699efe4.tar.bz2 dispatcher-26fbd8c1edaf94513d9750681edbe449b699efe4.zip |
Trains move on tracks to the beat
Small implementation changes in various places, biggest thing is now we're using ranges, which is experimental and will be included for real in C++20.
Diffstat (limited to 'src/direction.h')
-rw-r--r-- | src/direction.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/direction.h b/src/direction.h new file mode 100644 index 0000000..8108505 --- /dev/null +++ b/src/direction.h | |||
@@ -0,0 +1,18 @@ | |||
1 | #ifndef DIRECTION_H_2B40D968 | ||
2 | #define DIRECTION_H_2B40D968 | ||
3 | |||
4 | #include "vector.h" | ||
5 | |||
6 | enum class Direction { | ||
7 | none, | ||
8 | left, | ||
9 | right, | ||
10 | up, | ||
11 | down | ||
12 | }; | ||
13 | |||
14 | vec2s posInDir(vec2s orig, Direction dir); | ||
15 | |||
16 | Direction oppositeDir(Direction dir); | ||
17 | |||
18 | #endif /* end of include guard: DIRECTION_H_2B40D968 */ | ||