fix #2: Add common PGN tags in "specialMetadata" array.

This commit is contained in:
2023-06-14 15:48:15 +02:00
parent 5ca6c49f62
commit e939a58b38
3 changed files with 6 additions and 4 deletions

View File

@@ -15,13 +15,13 @@ class CHESS_JSON {
const MOVE_CAPTURE = 'capture';
const MOVE_PROMOTE_TO = 'promoteTo';
const MOVE_CASTLE = 'castle';
const MOVE_PARSED = 'castle';
const MOVE_PARSED = 'parsed';
const GAME_METADATA = 'metadata';
const GAME_EVENT = 'event';
const GAME_WHITE = 'white';
const GAME_BLACK = 'black';
const GAME_ECO = 'black';
const GAME_ECO = 'eco';
const PGN_KEY_ACTION_ARROW = "ar";
const PGN_KEY_ACTION_HIGHLIGHT = "sq";

View File

@@ -75,4 +75,4 @@ class GameParser
{
return $this->game[CHESS_JSON::FEN];
}
}
}

View File

@@ -10,7 +10,9 @@ class PgnGameParser{
private $specialMetadata = array(
'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){