2019-07-19 22:16:02 +02:00
|
|
|
package dev.kske.chess.uci;
|
|
|
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Project: <strong>Chess</strong><br>
|
|
|
|
* File: <strong>UCIListener.java</strong><br>
|
|
|
|
* Created: <strong>19.07.2019</strong><br>
|
|
|
|
* Author: <strong>Kai S. K. Engelbart</strong>
|
|
|
|
*/
|
|
|
|
public interface UCIListener {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Identifies the name of the engine.
|
|
|
|
*
|
|
|
|
* @param name The name of the engine
|
|
|
|
*/
|
2019-07-23 11:54:43 +02:00
|
|
|
default void onIdName(String name) {}
|
2019-07-19 22:16:02 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Identifies the author of the engine.
|
|
|
|
*
|
|
|
|
* @param author The name of the engine's author
|
|
|
|
*/
|
2019-07-23 11:54:43 +02:00
|
|
|
default void onIdAuthor(String author) {}
|
2019-07-19 22:16:02 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The engine is ready in UCI mode.
|
|
|
|
*/
|
2019-07-23 11:54:43 +02:00
|
|
|
default void onUCIOk() {}
|
2019-07-19 22:16:02 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The engine has processed all inputs and is ready for new commands.
|
|
|
|
*/
|
2019-07-23 11:54:43 +02:00
|
|
|
default void onReadyOk() {}
|
2019-07-19 22:16:02 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The engine has stopped searching and has found the best move.
|
|
|
|
*
|
|
|
|
* @param move The best moves the engine has found
|
|
|
|
*/
|
2019-07-23 11:54:43 +02:00
|
|
|
default void onBestMove(String move) {}
|
2019-07-19 22:16:02 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The engine has stopped searching and has found the best move.
|
|
|
|
*
|
|
|
|
* @param move The best move the engine has found
|
|
|
|
* @param ponderMove The move the engine likes to ponder on
|
|
|
|
*/
|
2019-07-23 11:54:43 +02:00
|
|
|
default void onBestMove(String move, String ponderMove) {}
|
2019-07-19 22:16:02 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The engine will check the copy protection now.
|
|
|
|
*/
|
2019-07-23 11:54:43 +02:00
|
|
|
default void onCopyProtectionChecking() {}
|
2019-07-19 22:16:02 +02:00
|
|
|
/**
|
|
|
|
* The engine has successfully checked the copy protection.
|
|
|
|
*/
|
2019-07-23 11:54:43 +02:00
|
|
|
default void onCopyProtectionOk() {}
|
2019-07-19 22:16:02 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The engine has encountered an error during copy protection checking.
|
|
|
|
*/
|
2019-07-23 11:54:43 +02:00
|
|
|
default void onCopyProtectionError() {}
|
2019-07-19 22:16:02 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The engine will check the registration now.
|
|
|
|
*/
|
2019-07-23 11:54:43 +02:00
|
|
|
default void onRegistrationChecking() {}
|
2019-07-19 22:16:02 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The engine has successfully checked the registration.
|
|
|
|
*/
|
2019-07-23 11:54:43 +02:00
|
|
|
default void onRegistrationOk() {}
|
2019-07-19 22:16:02 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The engine has encountered an error during registration checking.
|
|
|
|
*/
|
2019-07-23 11:54:43 +02:00
|
|
|
default void onRegistrationError() {}
|
2019-07-19 22:16:02 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The engine sends information to the GUI.
|
|
|
|
*
|
|
|
|
* @param additionalInfo Contains all pieces of information to be sent
|
|
|
|
*/
|
2019-07-23 11:54:43 +02:00
|
|
|
default void onInfo(Map<String, String> additionalInfo) {}
|
2019-07-19 22:16:02 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Tells the GUI which parameters can be changed in the engine.
|
|
|
|
*
|
2019-07-22 08:59:13 +02:00
|
|
|
* @param option Option object describing the parameter
|
2019-07-19 22:16:02 +02:00
|
|
|
*/
|
2019-07-23 11:54:43 +02:00
|
|
|
default void onOption(UCIOption option) {}
|
2019-07-19 22:16:02 +02:00
|
|
|
}
|