fix #2: Add common PGN tags in "specialMetadata" array.
This commit is contained in:
@@ -15,13 +15,13 @@ class CHESS_JSON {
|
|||||||
const MOVE_CAPTURE = 'capture';
|
const MOVE_CAPTURE = 'capture';
|
||||||
const MOVE_PROMOTE_TO = 'promoteTo';
|
const MOVE_PROMOTE_TO = 'promoteTo';
|
||||||
const MOVE_CASTLE = 'castle';
|
const MOVE_CASTLE = 'castle';
|
||||||
const MOVE_PARSED = 'castle';
|
const MOVE_PARSED = 'parsed';
|
||||||
|
|
||||||
const GAME_METADATA = 'metadata';
|
const GAME_METADATA = 'metadata';
|
||||||
const GAME_EVENT = 'event';
|
const GAME_EVENT = 'event';
|
||||||
const GAME_WHITE = 'white';
|
const GAME_WHITE = 'white';
|
||||||
const GAME_BLACK = 'black';
|
const GAME_BLACK = 'black';
|
||||||
const GAME_ECO = 'black';
|
const GAME_ECO = 'eco';
|
||||||
|
|
||||||
const PGN_KEY_ACTION_ARROW = "ar";
|
const PGN_KEY_ACTION_ARROW = "ar";
|
||||||
const PGN_KEY_ACTION_HIGHLIGHT = "sq";
|
const PGN_KEY_ACTION_HIGHLIGHT = "sq";
|
||||||
|
@@ -75,4 +75,4 @@ class GameParser
|
|||||||
{
|
{
|
||||||
return $this->game[CHESS_JSON::FEN];
|
return $this->game[CHESS_JSON::FEN];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -10,7 +10,9 @@ class PgnGameParser{
|
|||||||
|
|
||||||
private $specialMetadata = array(
|
private $specialMetadata = array(
|
||||||
'event','site','white','black','result','plycount','eco','fen',
|
'event','site','white','black','result','plycount','eco','fen',
|
||||||
'timecontrol','round','date','annotator','termination'
|
'timecontrol','round','date','annotator','termination',
|
||||||
|
'whiteelo', 'blackelo', 'whiteteam', 'blackteam',
|
||||||
|
'opening', 'eventdate', 'seat'
|
||||||
);
|
);
|
||||||
|
|
||||||
public function __construct($pgnGame = null){
|
public function __construct($pgnGame = null){
|
||||||
|
Reference in New Issue
Block a user