libscid snapshot+1833ab5ad39d
Chess applications made easy.
Source on GitHub License GPL v2
Loading...
Searching...
No Matches
game_result.h File Reference

Game result codes and formatting tables. More...

+ Include dependency graph for game_result.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  scid
 Public namespace for libscid.
 
namespace  scid::core
 Chess games, positions, movetext and notation.
 

Typedefs

typedef byte scid::core::resultT
 Game result code used by Game and database statistics.
 

Variables

const uint scid::core::NUM_RESULT_TYPES = 4
 Number of result codes, including unknown/unfinished games.
 
const resultT scid::core::RESULT_None = 0
 Unknown, unfinished, or no-result game.
 
const resultT scid::core::RESULT_White = 1
 White win.
 
const resultT scid::core::RESULT_Black = 2
 Black win.
 
const resultT scid::core::RESULT_Draw = 3
 Draw.
 
const uint scid::core::RESULT_SCORE [4] = {1, 2, 0, 1}
 Half-point scores from White's perspective: win=2, draw=1, loss=0.
 
const char scid::core::RESULT_CHAR [4] = {'*', '1', '0', '='}
 Compact one-character result markers.
 
const char scid::core::RESULT_STR [4][4] = {"*", "1-0", "0-1", "=-="}
 Short result strings used by legacy displays.
 
const char scid::core::RESULT_LONGSTR [4][8] = {"*", "1-0", "0-1", "1/2-1/2"}
 PGN result strings.
 
const resultT scid::core::RESULT_OPPOSITE [4]
 Result from the opposite player's perspective.
 

Detailed Description

Game result codes and formatting tables.