Position.hpp 314 B

1234567891011121314151617181920
  1. // SPDX-License-Identifier: GPL-2.0-or-later
  2. #ifndef _SNAKE_POSITION_HPP_
  3. #define _SNAKE_POSITION_HPP_
  4. #include <cstdint>
  5. struct Position
  6. {
  7. int8_t x;
  8. int8_t y;
  9. };
  10. inline bool operator==(const Position& left, const Position& right)
  11. {
  12. return (left.x == right.x && left.y == right.y) ? true : false;
  13. }
  14. #endif