19 const auto&
get_tl() const noexcept {
return m_top_left; }
20 const auto&
get_br() const noexcept {
return m_bottom_right; }
An exact coordinate anywhere on the board.
Definition game_coordinate.h:32
A rectangle of game coordinates.
Definition game_rect.h:12
const auto & get_tl() const noexcept
Definition game_rect.h:19
const auto & get_br() const noexcept
Definition game_rect.h:20
std::ostream & operator<<(std::ostream &os, const game_rect &r) noexcept
Definition game_rect.cpp:112
bool operator==(const game_rect &lhs, const game_rect &rhs) noexcept
Definition game_rect.cpp:105
int get_height(const game_rect &r) noexcept
Definition game_rect.cpp:24
int get_width(const game_rect &r) noexcept
Definition game_rect.cpp:28
void test_game_rect()
Test this class and its free functions.
Definition game_rect.cpp:42
game_coordinate get_center(const game_rect &r) noexcept
Definition game_rect.cpp:16
bool is_in(const game_coordinate &pos, const game_rect &r) noexcept
Is the coordinat in the rectangle?
Definition game_rect.cpp:33