Interface UCIResponse

All Superinterfaces:
UCICommand
All Known Implementing Classes:
RspBestMove, RspId, RspInfo, RspOption, RspReadyOk, RspUciOk

public interface UCIResponse extends UCICommand
The UCIResponse interface represents response commands sent from the chess engine to the GUI as part of the Universal Chess Interface (UCI) protocol.

A UCIResponse is categorized by its type, which indicates the nature of the response. Implementations of this interface must define the specific behavior and representation of each response type.

Response types include: - ID: Provides identification details such as the engine name or author. - UCIOK: Indicates the engine has successfully recognized the UCI command. - READYOK: Indicates the engine is ready to process further commands. - INFO: Provides informational updates about the engine's analysis. - BESTMOVE: Indicates the best move calculated by the engine, and optionally, a ponder move.

Each response can be executed on a UCIGui instance to process or handle the response appropriately. The concrete implementation of this interface determines the specific execution logic.

Author:
Mauricio Coria
  • Method Details

    • execute

      void execute(UCIGui executor)
      Executes the response using the provided UCIGui instance.
      Parameters:
      executor - The UCIGui instance that will execute the response.
    • uciok

      static RspUciOk uciok()
    • readyok

      static RspReadyOk readyok()
    • idName

      static RspId idName(String author)
    • idAuthor

      static RspId idAuthor(String author)
    • bestMove

      static RspBestMove bestMove(String bestMove, String ponderMove)
    • bestMove

      static RspBestMove bestMove(String bestMove)
    • createStringOption

      static RspOption createStringOption(String name, String defaultValue)
    • createCheckOption

      static RspOption createCheckOption(String name, boolean defaultValue)
    • info

      static RspInfo info(String info)