tartan  1.2.1.0
tt Namespace Reference

Tartan library namespace. More...

Namespaces

 chess
 Chess game namespace.
 
 ex
 Tartan tt::Board exceptions set.
 

Classes

class  Piece
 Generic board memeber piece API. More...
 
class  Board
 8x8 game board More...
 

Typedefs

using TurnMap = Piece::TurnMap
 
using Position = Piece::Position
 
using Turn = Piece::Turn
 
using Color = Piece::Color
 
using BoardT = std::array< std::array< Piece *, 8 >, 8 >
 Underlying Board grid representation type.
 

Functions

std::ostreamoperator<< (std::ostream &os, const Board &cb)
 
bool operator!= (const Board &lhs, const Board &rhs)
 
bool operator== (const Board &lhs, const Board &rhs)
 
bool operator== (const Position &lhs, const Position &rhs)
 
std::ostreamoperator<< (std::ostream &os, const Position &p)
 
bool operator== (const Turn &lhs, const Turn &rhs)
 
bool operator!= (const Turn &lhs, const Turn &rhs)
 
std::ostreamoperator<< (std::ostream &os, const Turn &t)
 
bool operator== (const TurnMap &lhs, const TurnMap &rhs)
 
bool operator!= (const TurnMap &lhs, const TurnMap &rhs)
 

Detailed Description

Tartan library namespace.

Function Documentation

◆ operator!=() [1/3]

bool tt::operator!= ( const Board lhs,
const Board rhs 
)

This is a bind to function !lhs.isEqual(rhs).

See also
isEqual()

◆ operator!=() [2/3]

bool tt::operator!= ( const Turn lhs,
const Turn rhs 
)
Parameters
lhsleft object of == operator
rhsright object of == operator
Returns
the value of !lhs.isEqual(rhs)
See also
isEqual()

◆ operator!=() [3/3]

bool tt::operator!= ( const TurnMap lhs,
const TurnMap rhs 
)
Returns
lhs if every Turn object of lhs is equal to every corresponding object in rhs true otherwise

◆ operator<<() [1/3]

std::ostream& tt::operator<< ( std::ostream os,
const Board cb 
)

This function puts the str() function result to os object with << operator.

Parameters
oscalling object
bBoard object for display
Returns
calling os object

◆ operator<<() [2/3]

std::ostream& tt::operator<< ( std::ostream os,
const Position p 
)

Puts string representation of position to std::ostream.

Returns
called std::ostream object
See also
str()

◆ operator<<() [3/3]

std::ostream& tt::operator<< ( std::ostream os,
const Turn t 
)

Puts the t.str() in os object

Parameters
osinvoking std::ostream object
tTurn object for writting
Returns
invoking std::ostream os object

◆ operator==() [1/4]

bool tt::operator== ( const Board lhs,
const Board rhs 
)

This is a bind to function lhs.isEqual(rhs).

See also
isEqual()

◆ operator==() [2/4]

bool tt::operator== ( const Position lhs,
const Position rhs 
)
Returns
true if corresponding coordinates of both objects are equal

◆ operator==() [3/4]

bool tt::operator== ( const Turn lhs,
const Turn rhs 
)
Parameters
lhsleft object of == operator
rhsright object of == operator
Returns
the value of lhs.isEqual(rhs)
See also
isEqual()

◆ operator==() [4/4]

bool tt::operator== ( const TurnMap lhs,
const TurnMap rhs 
)
Returns
true if every Turn object of lhs is equal to every corresponding object in rhs, false otherwise