Class Game
Description of Game:
A PGN Game is composed by a set of tags (at least STR) and a movetext section:
The movetext section is composed of chess moves, move number indications,
optional annotations, and a single concluding game termination marker.
Namespace: pgn
Author:
Geraldo
See:
pgn_standard.txt
Located at pgn/Game.php
Methods summary
public
|
|
public
string
|
#
__toString( )
Returns a string representation of the Game object
Returns a string representation of the Game object
Returns
string a string representation of the PGN object
|
public
string
|
#
toString( string $endLine = "\n" )
Returns a string representation of the Game object
Returns a string representation of the Game object
Parameters
- $endLine
$endl The end-line character (default: "\n").
Example:
<code>
<?php
$object = new Game;
$object->toString("<br />");
</code>
Returns
string a string representation of the PGN object
|
public
|
#
parse( string $unparsedGame )
Parses a string containing a game and fills movetext and tags attributes.
The tag attribute is filled as an associative array (TagName => TagObject)
Parses a string containing a game and fills movetext and tags attributes.
The tag attribute is filled as an associative array (TagName => TagObject)
Parameters
- $unparsedGame
- string containing one PGN Game
Throws
Assert(123)
throws pgn\exceptions\InvalidGameFormatException
Assert(null)
throws pgn\exceptions\InvalidGameFormatException
|
public
pgn\tags\Tag
|
|
public
|
|
protected
boolean
|
#
checkMoveText( string $uncheckedMoveText )
Parameters
Returns
boolean
|
protected
|
|