Defines | Typedefs | Functions

chess_printer.h File Reference

#include "chess.h"
Include dependency graph for chess_printer.h:
This graph shows which files directly or indirectly include this file:

Defines

#define PIECE_SYMBOL_STRING_LEN   14

Typedefs

typedef char ChessPieceSymbol [PIECE_SYMBOL_STRING_LEN]

Functions

void print_chess_board (ChessBoard chess_board)
bool get_piece_symbol (struct ChessPiece piece, ChessPieceSymbol piece_symbol)

Define Documentation

#define PIECE_SYMBOL_STRING_LEN   14

Constant defining the length of the string holding the symbol of a chess piece. This string also holds the color information and, therefore, has to get this length.


Typedef Documentation

typedef char ChessPieceSymbol[PIECE_SYMBOL_STRING_LEN]

The chess piece symbol holds the printable form of a chess piece.


Function Documentation

bool get_piece_symbol ( struct ChessPiece  piece,
ChessPieceSymbol  piece_symbol 
)

Provides a printable symbol for a specific chess piece.

Parameters:
piece The chess piece which symbol to be returned.
piece_symbol The symbol of the chess piece in printable form
Returns:
True if the requested symbol was found, i.e, the given piece has a valid color and type, False otherwise.
See also:
PieceType, PieceColor, ChessPiece
void print_chess_board ( ChessBoard  chess_board  ) 

print_chess_board prints a chess board into the terminal window.

Parameters:
chess_board The chess board to be printed.

Here is the call graph for this function:

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines