Interface definitions for chess board adapters. IChessBoardAdapter defines methods to apply local and remote moves using UCI, and to export/import board state. IChessInitialPositionAdapter defines an optional method to set an initial position using a FEN string.
#nullable enable annotations
namespace LichessNET.Gameplay;
public interface IChessBoardAdapter
{
bool TryApplyLocalMove(string uci);
bool TryApplyRemoteMove(string uci);
string ExportState();
void ImportState(string state);
}
/// <summary>
/// Optional adapter capability for games whose gameFull event supplies a
/// non-starting FEN.
/// </summary>
public interface IChessInitialPositionAdapter
{
bool TrySetInitialPosition(string fen);
}