Scid  4.6.5
Classes | Macros | Typedefs | Enumerations | Functions | Variables
game.h File Reference
#include "common.h"
#include "date.h"
#include "indexentry.h"
#include "position.h"
#include "namebase.h"
#include "matsig.h"
#include <vector>
#include <string>
Include dependency graph for game.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  patternT
 
class  moveT
 
struct  moveChunkT
 
struct  tagT
 
class  Game
 

Macros

#define MAX_NAGS   8
 
#define MOVE_CHUNKSIZE   100
 
#define GAME_DECODE_NONE   0
 
#define GAME_DECODE_TAGS   1
 
#define GAME_DECODE_COMMENTS   2
 
#define GAME_DECODE_ALL   3
 
#define PGN_STYLE_TAGS   1
 
#define PGN_STYLE_COMMENTS   2
 
#define PGN_STYLE_VARS   4
 
#define PGN_STYLE_INDENT_COMMENTS   8
 
#define PGN_STYLE_INDENT_VARS   16
 
#define PGN_STYLE_SYMBOLS   32
 
#define PGN_STYLE_SHORT_HEADER   64
 
#define PGN_STYLE_MOVENUM_SPACE   128
 
#define PGN_STYLE_COLUMN   256
 
#define PGN_STYLE_SCIDFLAGS   512
 
#define PGN_STYLE_STRIP_MARKS   1024
 
#define PGN_STYLE_NO_NULL_MOVES   2048
 
#define PGN_STYLE_UNICODE   4096
 

Typedefs

typedef byte markerT
 

Enumerations

enum  gameExactMatchT { GAME_EXACT_MATCH_Exact = 0, GAME_EXACT_MATCH_Pawns, GAME_EXACT_MATCH_Fyles, GAME_EXACT_MATCH_Material }
 
enum  gameFormatT { PGN_FORMAT_Plain = 0, PGN_FORMAT_HTML = 1, PGN_FORMAT_LaTeX = 2, PGN_FORMAT_Color = 3 }
 

Functions

void transPieces (char *s)
 
char transPiecesChar (char c)
 
void game_printNag (byte nag, char *str, bool asSymbol, gameFormatT format)
 
byte game_parseNag (const char *str)
 
uint strGetRatingType (const char *name)
 

Variables

int language
 
const char * langPieces []
 
const byte NAG_GoodMove = 1
 
const byte NAG_PoorMove = 2
 
const byte NAG_ExcellentMove = 3
 
const byte NAG_Blunder = 4
 
const byte NAG_InterestingMove = 5
 
const byte NAG_DubiousMove = 6
 
const byte NAG_OnlyMove = 8
 
const byte NAG_Equal = 10
 
const byte NAG_Unclear = 13
 
const byte NAG_WhiteSlight = 14
 
const byte NAG_BlackSlight = 15
 
const byte NAG_WhiteClear = 16
 
const byte NAG_BlackClear = 17
 
const byte NAG_WhiteDecisive = 18
 
const byte NAG_BlackDecisive = 19
 
const byte NAG_WhiteCrushing = 20
 
const byte NAG_BlackCrushing = 21
 
const byte NAG_ZugZwang = 22
 
const byte NAG_BlackZugZwang = 23
 
const byte NAG_MoreRoom = 26
 
const byte NAG_DevelopmentAdvantage = 35
 
const byte NAG_WithInitiative = 36
 
const byte NAG_WithAttack = 40
 
const byte NAG_WithBlackAttack = 41
 
const byte NAG_Compensation = 44
 
const byte NAG_SlightCentre = 48
 
const byte NAG_Centre = 50
 
const byte NAG_SlightKingSide = 54
 
const byte NAG_ModerateKingSide = 56
 
const byte NAG_KingSide = 58
 
const byte NAG_SlightQueenSide = 60
 
const byte NAG_ModerateQueenSide = 62
 
const byte NAG_QueenSide = 64
 
const byte NAG_SlightCounterPlay = 130
 
const byte NAG_CounterPlay = 132
 
const byte NAG_DecisiveCounterPlay = 134
 
const byte NAG_BlackSlightCounterPlay = 131
 
const byte NAG_BlackCounterPlay = 133
 
const byte NAG_BlackDecisiveCounterPlay = 135
 
const byte NAG_TimeLimit = 136
 
const byte NAG_WithIdea = 140
 
const byte NAG_BetterIs = 142
 
const byte NAG_VariousMoves = 144
 
const byte NAG_Comment = 145
 
const byte NAG_Novelty = 146
 
const byte NAG_WeakPoint = 147
 
const byte NAG_Ending = 148
 
const byte NAG_File = 149
 
const byte NAG_Diagonal = 150
 
const byte NAG_BishopPair = 151
 
const byte NAG_OppositeBishops = 153
 
const byte NAG_SameBishops = 154
 
const byte NAG_Etc = 190
 
const byte NAG_DoublePawns = 191
 
const byte NAG_SeparatedPawns = 192
 
const byte NAG_UnitedPawns = 193
 
const byte NAG_Diagram = 201
 
const byte NAG_See = 210
 
const byte NAG_Mate = 211
 
const byte NAG_PassedPawn = 212
 
const byte NAG_MorePawns = 213
 
const byte NAG_With = 214
 
const byte NAG_Without = 215
 
const byte MAX_NAGS_ARRAY = 215
 
const uint MAX_TAGS = 40
 
const uint MAX_TAG_LEN = 240
 
const markerT NO_MARKER = 0
 
const markerT START_MARKER = 1
 
const markerT END_MARKER = 2
 
const markerT END_GAME = 3
 

Macro Definition Documentation

#define GAME_DECODE_ALL   3

Definition at line 185 of file game.h.

#define GAME_DECODE_COMMENTS   2

Definition at line 184 of file game.h.

#define GAME_DECODE_NONE   0

Definition at line 182 of file game.h.

#define GAME_DECODE_TAGS   1

Definition at line 183 of file game.h.

#define MAX_NAGS   8

Definition at line 138 of file game.h.

#define MOVE_CHUNKSIZE   100

Definition at line 167 of file game.h.

#define PGN_STYLE_COLUMN   256

Definition at line 209 of file game.h.

#define PGN_STYLE_COMMENTS   2

Definition at line 202 of file game.h.

#define PGN_STYLE_INDENT_COMMENTS   8

Definition at line 204 of file game.h.

#define PGN_STYLE_INDENT_VARS   16

Definition at line 205 of file game.h.

#define PGN_STYLE_MOVENUM_SPACE   128

Definition at line 208 of file game.h.

#define PGN_STYLE_NO_NULL_MOVES   2048

Definition at line 212 of file game.h.

#define PGN_STYLE_SCIDFLAGS   512

Definition at line 210 of file game.h.

#define PGN_STYLE_SHORT_HEADER   64

Definition at line 207 of file game.h.

#define PGN_STYLE_STRIP_MARKS   1024

Definition at line 211 of file game.h.

#define PGN_STYLE_SYMBOLS   32

Definition at line 206 of file game.h.

#define PGN_STYLE_TAGS   1

Definition at line 201 of file game.h.

#define PGN_STYLE_UNICODE   4096

Definition at line 213 of file game.h.

#define PGN_STYLE_VARS   4

Definition at line 203 of file game.h.

Typedef Documentation

typedef byte markerT

Definition at line 115 of file game.h.

Enumeration Type Documentation

Enumerator
GAME_EXACT_MATCH_Exact 
GAME_EXACT_MATCH_Pawns 
GAME_EXACT_MATCH_Fyles 
GAME_EXACT_MATCH_Material 

Definition at line 187 of file game.h.

Enumerator
PGN_FORMAT_Plain 
PGN_FORMAT_HTML 
PGN_FORMAT_LaTeX 
PGN_FORMAT_Color 

Definition at line 194 of file game.h.

Function Documentation

byte game_parseNag ( const char *  str)

Definition at line 186 of file game.cpp.

void game_printNag ( byte  nag,
char *  str,
bool  asSymbol,
gameFormatT  format 
)

Definition at line 143 of file game.cpp.

uint strGetRatingType ( const char *  name)

Definition at line 125 of file game.cpp.

void transPieces ( char *  s)

Definition at line 42 of file game.cpp.

char transPiecesChar ( char  c)

Definition at line 60 of file game.cpp.

Variable Documentation

const markerT END_GAME = 3

Definition at line 120 of file game.h.

const markerT END_MARKER = 2

Definition at line 119 of file game.h.

const char* langPieces[]

Definition at line 34 of file game.cpp.

int language

Definition at line 29 of file game.cpp.

const byte MAX_NAGS_ARRAY = 215

Definition at line 108 of file game.h.

const uint MAX_TAG_LEN = 240

Definition at line 113 of file game.h.

const uint MAX_TAGS = 40

Definition at line 111 of file game.h.

const byte NAG_BetterIs = 142

Definition at line 84 of file game.h.

const byte NAG_BishopPair = 151

Definition at line 92 of file game.h.

const byte NAG_BlackClear = 17

Definition at line 55 of file game.h.

const byte NAG_BlackCounterPlay = 133

Definition at line 80 of file game.h.

const byte NAG_BlackCrushing = 21

Definition at line 59 of file game.h.

const byte NAG_BlackDecisive = 19

Definition at line 57 of file game.h.

const byte NAG_BlackDecisiveCounterPlay = 135

Definition at line 81 of file game.h.

const byte NAG_BlackSlight = 15

Definition at line 53 of file game.h.

const byte NAG_BlackSlightCounterPlay = 131

Definition at line 79 of file game.h.

const byte NAG_BlackZugZwang = 23

Definition at line 61 of file game.h.

const byte NAG_Blunder = 4

Definition at line 46 of file game.h.

const byte NAG_Centre = 50

Definition at line 69 of file game.h.

const byte NAG_Comment = 145

Definition at line 86 of file game.h.

const byte NAG_Compensation = 44

Definition at line 67 of file game.h.

const byte NAG_CounterPlay = 132

Definition at line 77 of file game.h.

const byte NAG_DecisiveCounterPlay = 134

Definition at line 78 of file game.h.

const byte NAG_DevelopmentAdvantage = 35

Definition at line 63 of file game.h.

const byte NAG_Diagonal = 150

Definition at line 91 of file game.h.

const byte NAG_Diagram = 201

Definition at line 99 of file game.h.

const byte NAG_DoublePawns = 191

Definition at line 96 of file game.h.

const byte NAG_DubiousMove = 6

Definition at line 48 of file game.h.

const byte NAG_Ending = 148

Definition at line 89 of file game.h.

const byte NAG_Equal = 10

Definition at line 50 of file game.h.

const byte NAG_Etc = 190

Definition at line 95 of file game.h.

const byte NAG_ExcellentMove = 3

Definition at line 45 of file game.h.

const byte NAG_File = 149

Definition at line 90 of file game.h.

const byte NAG_GoodMove = 1

Definition at line 43 of file game.h.

const byte NAG_InterestingMove = 5

Definition at line 47 of file game.h.

const byte NAG_KingSide = 58

Definition at line 72 of file game.h.

const byte NAG_Mate = 211

Definition at line 101 of file game.h.

const byte NAG_ModerateKingSide = 56

Definition at line 71 of file game.h.

const byte NAG_ModerateQueenSide = 62

Definition at line 74 of file game.h.

const byte NAG_MorePawns = 213

Definition at line 103 of file game.h.

const byte NAG_MoreRoom = 26

Definition at line 62 of file game.h.

const byte NAG_Novelty = 146

Definition at line 87 of file game.h.

const byte NAG_OnlyMove = 8

Definition at line 49 of file game.h.

const byte NAG_OppositeBishops = 153

Definition at line 93 of file game.h.

const byte NAG_PassedPawn = 212

Definition at line 102 of file game.h.

const byte NAG_PoorMove = 2

Definition at line 44 of file game.h.

const byte NAG_QueenSide = 64

Definition at line 75 of file game.h.

const byte NAG_SameBishops = 154

Definition at line 94 of file game.h.

const byte NAG_See = 210

Definition at line 100 of file game.h.

const byte NAG_SeparatedPawns = 192

Definition at line 97 of file game.h.

const byte NAG_SlightCentre = 48

Definition at line 68 of file game.h.

const byte NAG_SlightCounterPlay = 130

Definition at line 76 of file game.h.

const byte NAG_SlightKingSide = 54

Definition at line 70 of file game.h.

const byte NAG_SlightQueenSide = 60

Definition at line 73 of file game.h.

const byte NAG_TimeLimit = 136

Definition at line 82 of file game.h.

const byte NAG_Unclear = 13

Definition at line 51 of file game.h.

const byte NAG_UnitedPawns = 193

Definition at line 98 of file game.h.

const byte NAG_VariousMoves = 144

Definition at line 85 of file game.h.

const byte NAG_WeakPoint = 147

Definition at line 88 of file game.h.

const byte NAG_WhiteClear = 16

Definition at line 54 of file game.h.

const byte NAG_WhiteCrushing = 20

Definition at line 58 of file game.h.

const byte NAG_WhiteDecisive = 18

Definition at line 56 of file game.h.

const byte NAG_WhiteSlight = 14

Definition at line 52 of file game.h.

const byte NAG_With = 214

Definition at line 104 of file game.h.

const byte NAG_WithAttack = 40

Definition at line 65 of file game.h.

const byte NAG_WithBlackAttack = 41

Definition at line 66 of file game.h.

const byte NAG_WithIdea = 140

Definition at line 83 of file game.h.

const byte NAG_WithInitiative = 36

Definition at line 64 of file game.h.

const byte NAG_Without = 215

Definition at line 105 of file game.h.

const byte NAG_ZugZwang = 22

Definition at line 60 of file game.h.

const markerT NO_MARKER = 0

Definition at line 117 of file game.h.

const markerT START_MARKER = 1

Definition at line 118 of file game.h.