diff --git a/shared/src/traintastic/board/tilerotate.hpp b/shared/src/traintastic/board/tilerotate.hpp index be792cf9..8dbbede5 100644 --- a/shared/src/traintastic/board/tilerotate.hpp +++ b/shared/src/traintastic/board/tilerotate.hpp @@ -43,6 +43,12 @@ constexpr TileRotate operator +(TileRotate lhs, TileRotate rhs) return static_cast((static_cast>(lhs) + static_cast>(rhs)) % 8); } +constexpr TileRotate& operator +=(TileRotate& lhs, TileRotate rhs) +{ + lhs = lhs + rhs; + return lhs; +} + constexpr TileRotate operator -(TileRotate lhs, TileRotate rhs) { return static_cast((static_cast>(lhs) + 8 - static_cast>(rhs)) % 8);