From 26fbd8c1edaf94513d9750681edbe449b699efe4 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Fri, 22 Feb 2019 17:25:59 -0500 Subject: 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. --- src/direction.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/direction.h (limited to 'src/direction.h') 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 @@ +#ifndef DIRECTION_H_2B40D968 +#define DIRECTION_H_2B40D968 + +#include "vector.h" + +enum class Direction { + none, + left, + right, + up, + down +}; + +vec2s posInDir(vec2s orig, Direction dir); + +Direction oppositeDir(Direction dir); + +#endif /* end of include guard: DIRECTION_H_2B40D968 */ -- cgit 1.4.1