My Project
Classes | Typedefs | Functions | Variables
opening.c File Reference
#include "opening.h"
#include "board.h"
#include <ctype.h>

Classes

struct  OpeningName
 
struct  PositionName
 

Typedefs

typedef struct OpeningName OpeningName
 
typedef struct PositionName PositionName
 

Functions

static bool match (const char *s1, const char *s2)
 
const char * opening_get_line (const char *opening_name)
 Translate an opening name into its move sequence. More...
 
const char * opening_get_english_name (const Board *board)
 Check if a board has got an engilsh opening name. More...
 
const char * opening_get_french_name (const Board *board)
 Check if a board has got a french opening name. More...
 

Variables

static const OpeningName OPENING_NAME []
 
static const PositionName NOM_POSITION []
 
static const PositionName POSITION_NAME []
 

Detailed Description

Opening Name aliasing.

Date
1998 - 2017
Author
Richard Delorme
Version
4.4

Typedef Documentation

◆ OpeningName

typedef struct OpeningName OpeningName

opening name structure

◆ PositionName

typedef struct PositionName PositionName

reverse opening name

Function Documentation

◆ match()

static bool match ( const char *  s1,
const char *  s2 
)
static

Compare two string, ignoring accents, font case, etc.

Parameters
s1first string.
s2second string.

◆ opening_get_english_name()

const char * opening_get_english_name ( const Board board)

Check if a board has got an engilsh opening name.

Parameters
boardBoard. return An opening name, or NULL if none has been found.

◆ opening_get_french_name()

const char * opening_get_french_name ( const Board board)

Check if a board has got a french opening name.

Parameters
boardBoard. return An opening name, or NULL if none has been found.

◆ opening_get_line()

const char * opening_get_line ( const char *  opening_name)

Translate an opening name into its move sequence.

Parameters
opening_nameAn opening name (in lowercase).
Returns
A move sequence.

Variable Documentation

◆ NOM_POSITION

const PositionName NOM_POSITION[]
static

The list of french opening names

◆ OPENING_NAME

const OpeningName OPENING_NAME[]
static

The list of french & english opening names

◆ POSITION_NAME

const PositionName POSITION_NAME[]
static

The list of french opening names