Conquer Chess
Chess and Starcraft combined
Loading...
Searching...
No Matches
Functions
game_rect.cpp File Reference
#include "game_rect.h"
#include <cassert>
#include <iostream>
#include <sstream>
Include dependency graph for game_rect.cpp:

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.