2 * Copyright (c) 2018-2019. Developed by Hedgecode.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package org.hedgecode.chess.uci;
20 * UCI protocol constants.
22 * @author Dmitry Samoshin aka gotty
24 public final class UCIConstants {
26 public static final String UCI = "uci";
27 public static final String DEBUG = "debug";
28 public static final String IS_READY = "isready";
29 public static final String SET_OPTION = "setoption";
30 public static final String REGISTER = "register";
31 public static final String UCI_NEW_GAME = "ucinewgame";
32 public static final String POSITION = "position";
33 public static final String GO = "go";
34 public static final String STOP = "stop";
35 public static final String PONDER_HIT = "ponderhit";
36 public static final String QUIT = "quit";
38 public static final String ID = "id";
39 public static final String UCI_OK = "uciok";
40 public static final String READY_OK = "readyok";
41 public static final String BEST_MOVE = "bestmove";
42 public static final String COPY_PROTECTION = "copyprotection";
43 public static final String REGISTRATION = "registration";
44 public static final String INFO = "info";
45 public static final String OPTION = "option";
46 public static final String TERMINATE = "terminate";
48 public static final String COMMAND_SEP_REGEX = "\\s+";
50 public static final String NULLMOVE = "0000";
51 public static final String MOVE_REGEX = "^([a-h][1-8])([a-h][1-8])([nbrq])?$";
52 public static final int MOVE_REGEX_FROM = 1;
53 public static final int MOVE_REGEX_TO = 2;
54 public static final int MOVE_REGEX_PROMOTE = 3;
56 public static final String LOCALE_BUNDLE_FILE = "org.hedgecode.chess.uci.LocalStrings";
59 private UCIConstants() {
60 throw new AssertionError(
61 "No UCIConstants instances!"