ChessBrowser
Extension to create interactive chess boards
Loading...
Searching...
No Matches
MediaWiki\Extension\ChessBrowser\NotationAnalyzer Class Reference

Public Member Functions

 __construct (string $notation)
 
 getFromRank ()
 Get the rank the piece started on.
 
 getFromFile ()
 Get the file the piece started on.
 
 getTargetSquare ()
 Get the target square.
 
 getPieceType (string $color)
 Get the piece type making the move.
 
 getPromotion ()
 Get the promotion.
 

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Extension\ChessBrowser\NotationAnalyzer::__construct ( string $notation)
Parameters
string$notation

Member Function Documentation

◆ getFromFile()

MediaWiki\Extension\ChessBrowser\NotationAnalyzer::getFromFile ( )

Get the file the piece started on.

Returns
int|null

◆ getFromRank()

MediaWiki\Extension\ChessBrowser\NotationAnalyzer::getFromRank ( )

Get the rank the piece started on.

Returns
int|null

◆ getPieceType()

MediaWiki\Extension\ChessBrowser\NotationAnalyzer::getPieceType ( string $color)

Get the piece type making the move.

Parameters
string$color
Returns
int

◆ getPromotion()

MediaWiki\Extension\ChessBrowser\NotationAnalyzer::getPromotion ( )

Get the promotion.

If the notation token contains an equal sign then it's a promotion

Returns
string

◆ getTargetSquare()

MediaWiki\Extension\ChessBrowser\NotationAnalyzer::getTargetSquare ( )

Get the target square.

Returns
int|string

The documentation for this class was generated from the following file: