Conquer Chess
Chess and Starcraft combined
Loading...
Searching...
No Matches
Classes | Functions
game_rect.h File Reference
#include "game_coordinate.h"
#include <iosfwd>
Include dependency graph for game_rect.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  game_rect
 A rectangle of game coordinates. More...
 

Functions

game_coordinate get_center (const game_rect &r) noexcept
 
int get_height (const game_rect &r) noexcept
 
int get_width (const game_rect &r) noexcept
 
bool is_in (const game_coordinate &pos, const game_rect &r) noexcept
 Is the coordinat in the rectangle?
 
void test_game_rect ()
 Test this class and its free functions.
 
bool operator== (const game_rect &lhs, const game_rect &rhs) noexcept
 
std::ostream & operator<< (std::ostream &os, const game_rect &r) noexcept
 

Function Documentation

◆ get_center()

game_coordinate get_center ( const game_rect r)
noexcept

◆ get_height()

int get_height ( const game_rect r)
noexcept

◆ get_width()

int get_width ( const game_rect r)
noexcept

◆ is_in()

bool is_in ( const game_coordinate pos,
const game_rect r 
)
noexcept

Is the coordinat in the rectangle?

◆ operator<<()

std::ostream & operator<< ( std::ostream &  os,
const game_rect r 
)
noexcept

◆ operator==()

bool operator== ( const game_rect lhs,
const game_rect rhs 
)
noexcept

◆ test_game_rect()

void test_game_rect ( )

Test this class and its free functions.