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

Public Member Functions

 __construct (string $fromFen)
 
 checkCastle (string $option)
 Is a castle currently valid (solely based on moved pieces, not the current board)
 
 updateForMove (int $movedPiece, int $from)
 Update the status after a move, and return the new castle status.
 

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Extension\ChessBrowser\CastlingTracker::__construct ( string $fromFen)
Parameters
string$fromFen

Member Function Documentation

◆ checkCastle()

MediaWiki\Extension\ChessBrowser\CastlingTracker::checkCastle ( string $option)

Is a castle currently valid (solely based on moved pieces, not the current board)

Parameters
string$option
Returns
bool whether this castle is valid

◆ updateForMove()

MediaWiki\Extension\ChessBrowser\CastlingTracker::updateForMove ( int $movedPiece,
int $from )

Update the status after a move, and return the new castle status.

Parameters
int$movedPiece
int$from
Returns
string

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