/*
- * Copyright (c) 2018. Developed by Hedgecode.
+ * Copyright (c) 2018-2020. Developed by Hedgecode.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* limitations under the License.
*/
-package org.hedgecode.chess.position;
+package org.hedgecode.chess;
+
+import org.hedgecode.chess.position.Position;
/**
*
/*
- * Copyright (c) 2018. Developed by Hedgecode.
+ * Copyright (c) 2018-2020. Developed by Hedgecode.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import org.hedgecode.chess.ascii.ASCIIBuilder;
import org.hedgecode.chess.fen.FENBuilder;
-import org.hedgecode.chess.position.Builder;
import org.hedgecode.chess.tcd.TCDBuilder;
import org.hedgecode.chess.wiki.WikiBuilder;
--- /dev/null
+/*
+ * Copyright (c) 2018-2020. Developed by Hedgecode.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.hedgecode.chess;
+
+/**
+ * FormatConstants
+ *
+ * @author Dmitry Samoshin aka gotty
+ */
+public final class FormatConstants {
+
+ public static final String LOCALE_BUNDLE_FILE = "org.hedgecode.chess.LocalStrings";
+
+ private FormatConstants() {
+ throw new AssertionError(
+ String.format("No %s instances!", getClass().getName())
+ );
+ }
+
+}
/*
- * Copyright (c) 2018. Developed by Hedgecode.
+ * Copyright (c) 2018-2020. Developed by Hedgecode.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* limitations under the License.
*/
-package org.hedgecode.chess.position;
+package org.hedgecode.chess;
import java.util.ResourceBundle;
-import org.hedgecode.chess.ChessHogConstants;
-
/**
* Incorrect parsing chess diagram/game Exception.
*
public class ParseException extends Exception {
private static final ResourceBundle LOCALE_BUNDLE =
- ResourceBundle.getBundle(ChessHogConstants.LOCALE_BUNDLE_FILE);
+ ResourceBundle.getBundle(FormatConstants.LOCALE_BUNDLE_FILE);
private String localeKey;
private String message;
/*
- * Copyright (c) 2018. Developed by Hedgecode.
+ * Copyright (c) 2018-2020. Developed by Hedgecode.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* limitations under the License.
*/
-package org.hedgecode.chess.position;
+package org.hedgecode.chess;
+
+import org.hedgecode.chess.position.Position;
/**
*
/*
- * Copyright (c) 2018. Developed by Hedgecode.
+ * Copyright (c) 2018-2020. Developed by Hedgecode.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import org.hedgecode.chess.ascii.ASCIIParser;
import org.hedgecode.chess.fen.FENParser;
-import org.hedgecode.chess.position.Parser;
import org.hedgecode.chess.tcd.TCDParser;
import org.hedgecode.chess.wiki.WikiParser;
/*
- * Copyright (c) 2018. Developed by Hedgecode.
+ * Copyright (c) 2018-2020. Developed by Hedgecode.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import java.util.Map;
+import org.hedgecode.chess.Builder;
import org.hedgecode.chess.Parsers;
-import org.hedgecode.chess.position.Builder;
+import org.hedgecode.chess.ParseException;
import org.hedgecode.chess.position.ColorPiece;
-import org.hedgecode.chess.position.ParseException;
import org.hedgecode.chess.position.Position;
import org.hedgecode.chess.position.Square;
/*
- * Copyright (c) 2018. Developed by Hedgecode.
+ * Copyright (c) 2018-2020. Developed by Hedgecode.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import java.util.regex.Pattern;
import org.hedgecode.chess.Builders;
+import org.hedgecode.chess.Parser;
+import org.hedgecode.chess.ParseException;
import org.hedgecode.chess.position.Color;
-import org.hedgecode.chess.position.ParseException;
-import org.hedgecode.chess.position.Parser;
import org.hedgecode.chess.position.Position;
import org.hedgecode.chess.position.Positions;
import org.hedgecode.chess.position.Square;
/*
- * Copyright (c) 2018. Developed by Hedgecode.
+ * Copyright (c) 2018-2020. Developed by Hedgecode.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import java.util.Map;
+import org.hedgecode.chess.Builder;
import org.hedgecode.chess.Parsers;
-import org.hedgecode.chess.position.Builder;
+import org.hedgecode.chess.ParseException;
import org.hedgecode.chess.position.Color;
import org.hedgecode.chess.position.ColorPiece;
-import org.hedgecode.chess.position.ParseException;
import org.hedgecode.chess.position.Position;
import org.hedgecode.chess.position.Square;
/*
- * Copyright (c) 2018. Developed by Hedgecode.
+ * Copyright (c) 2018-2020. Developed by Hedgecode.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import java.util.regex.Pattern;
+import org.hedgecode.chess.Parser;
+import org.hedgecode.chess.ParseException;
import org.hedgecode.chess.position.Color;
-import org.hedgecode.chess.position.ParseException;
-import org.hedgecode.chess.position.Parser;
import org.hedgecode.chess.position.Position;
import org.hedgecode.chess.position.Positions;
import org.hedgecode.chess.position.Square;
package org.hedgecode.chess.pgn;
+import org.hedgecode.chess.ParseException;
import org.hedgecode.chess.pgn.entity.Game;
import org.hedgecode.chess.pgn.token.Tokenizer;
import org.hedgecode.chess.pgn.entity.DetailGame;
-import org.hedgecode.chess.position.ParseException;
/**
* PGNParser
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import org.hedgecode.chess.ParseException;
import org.hedgecode.chess.pgn.entity.Moves;
-import org.hedgecode.chess.position.ParseException;
/**
* CommentToken
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import org.hedgecode.chess.ParseException;
import org.hedgecode.chess.pgn.PGNConstants;
import org.hedgecode.chess.pgn.entity.Game;
-import org.hedgecode.chess.position.ParseException;
/**
* EmptyToken
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import org.hedgecode.chess.ParseException;
import org.hedgecode.chess.pgn.entity.DetailMove;
import org.hedgecode.chess.pgn.entity.Moves;
-import org.hedgecode.chess.position.ParseException;
/**
* MoveToken
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import org.hedgecode.chess.ParseException;
import org.hedgecode.chess.pgn.PGNUtils;
import org.hedgecode.chess.pgn.entity.Moves;
-import org.hedgecode.chess.position.ParseException;
/**
* MovesToken
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import org.hedgecode.chess.ParseException;
import org.hedgecode.chess.pgn.PGNConstants;
import org.hedgecode.chess.pgn.entity.Game;
-import org.hedgecode.chess.position.ParseException;
/**
* TagToken
package org.hedgecode.chess.pgn.token;
-import org.hedgecode.chess.position.ParseException;
+import org.hedgecode.chess.ParseException;
/**
* Token
import java.util.regex.Pattern;
+import org.hedgecode.chess.ParseException;
import org.hedgecode.chess.pgn.entity.Game;
-import org.hedgecode.chess.position.ParseException;
/**
* Tokenizer
import java.util.regex.Pattern;
+import org.hedgecode.chess.ParseException;
import org.hedgecode.chess.pgn.entity.Moves;
import org.hedgecode.chess.pgn.entity.Variation;
-import org.hedgecode.chess.position.ParseException;
/**
* VariationToken
/*
- * Copyright (c) 2018-2019. Developed by Hedgecode.
+ * Copyright (c) 2018-2020. Developed by Hedgecode.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import java.util.Map;
+import org.hedgecode.chess.Builder;
import org.hedgecode.chess.Builders;
import org.hedgecode.chess.Parsers;
-import org.hedgecode.chess.position.Builder;
+import org.hedgecode.chess.ParseException;
import org.hedgecode.chess.position.Castle;
import org.hedgecode.chess.position.Color;
import org.hedgecode.chess.position.ColorPiece;
-import org.hedgecode.chess.position.ParseException;
import org.hedgecode.chess.position.Piece;
import org.hedgecode.chess.position.Position;
import org.hedgecode.chess.position.Positions;
/*
- * Copyright (c) 2018. Developed by Hedgecode.
+ * Copyright (c) 2018-2020. Developed by Hedgecode.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
package org.hedgecode.chess.tcd;
+import org.hedgecode.chess.Parser;
+import org.hedgecode.chess.ParseException;
import org.hedgecode.chess.position.Castle;
import org.hedgecode.chess.position.Color;
-import org.hedgecode.chess.position.ParseException;
-import org.hedgecode.chess.position.Parser;
import org.hedgecode.chess.position.Position;
import org.hedgecode.chess.position.Positions;
import org.hedgecode.chess.position.Square;
/*
- * Copyright (c) 2018. Developed by Hedgecode.
+ * Copyright (c) 2018-2020. Developed by Hedgecode.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import java.util.Map;
import java.util.ResourceBundle;
+import org.hedgecode.chess.Builder;
import org.hedgecode.chess.ChessHogConstants;
-import org.hedgecode.chess.position.Builder;
import org.hedgecode.chess.position.Color;
import org.hedgecode.chess.position.ColorPiece;
import org.hedgecode.chess.position.Position;
/*
- * Copyright (c) 2018. Developed by Hedgecode.
+ * Copyright (c) 2018-2020. Developed by Hedgecode.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import org.hedgecode.chess.position.ParseException;
-import org.hedgecode.chess.position.Parser;
+import org.hedgecode.chess.Parser;
+import org.hedgecode.chess.ParseException;
import org.hedgecode.chess.position.Position;
import org.hedgecode.chess.position.Positions;
import org.hedgecode.chess.position.Square;
/*
- * Copyright (c) 2018-2019. Developed by Hedgecode.
+ * Copyright (c) 2018-2020. Developed by Hedgecode.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import org.junit.runners.JUnit4;
import org.hedgecode.chess.AbstractPositionTest;
-import org.hedgecode.chess.position.Builder;
+import org.hedgecode.chess.Builder;
import org.hedgecode.chess.position.Position;
/**
/*
- * Copyright (c) 2018-2019. Developed by Hedgecode.
+ * Copyright (c) 2018-2020. Developed by Hedgecode.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import org.junit.runners.JUnit4;
import org.hedgecode.chess.AbstractPositionTest;
-import org.hedgecode.chess.position.Parser;
+import org.hedgecode.chess.Parser;
import org.hedgecode.chess.position.Position;
/**
/*
- * Copyright (c) 2018-2019. Developed by Hedgecode.
+ * Copyright (c) 2018-2020. Developed by Hedgecode.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import org.junit.runners.JUnit4;
import org.hedgecode.chess.AbstractPositionTest;
-import org.hedgecode.chess.position.Builder;
+import org.hedgecode.chess.Builder;
import org.hedgecode.chess.position.Position;
/**
/*
- * Copyright (c) 2018-2019. Developed by Hedgecode.
+ * Copyright (c) 2018-2020. Developed by Hedgecode.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import org.junit.runners.JUnit4;
import org.hedgecode.chess.AbstractPositionTest;
-import org.hedgecode.chess.position.Parser;
+import org.hedgecode.chess.Parser;
import org.hedgecode.chess.position.Position;
/**
/*
- * Copyright (c) 2018-2019. Developed by Hedgecode.
+ * Copyright (c) 2018-2020. Developed by Hedgecode.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import org.junit.runners.JUnit4;
import org.hedgecode.chess.AbstractPositionTest;
-import org.hedgecode.chess.position.Builder;
+import org.hedgecode.chess.Builder;
import org.hedgecode.chess.position.Position;
/**
/*
- * Copyright (c) 2018-2019. Developed by Hedgecode.
+ * Copyright (c) 2018-2020. Developed by Hedgecode.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import org.junit.runners.JUnit4;
import org.hedgecode.chess.AbstractPositionTest;
-import org.hedgecode.chess.position.Parser;
+import org.hedgecode.chess.Parser;
import org.hedgecode.chess.position.Position;
/**
/*
- * Copyright (c) 2018-2019. Developed by Hedgecode.
+ * Copyright (c) 2018-2020. Developed by Hedgecode.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import org.junit.runners.JUnit4;
import org.hedgecode.chess.AbstractPositionTest;
-import org.hedgecode.chess.position.Builder;
+import org.hedgecode.chess.Builder;
import org.hedgecode.chess.position.Position;
/**
/*
- * Copyright (c) 2018-2019. Developed by Hedgecode.
+ * Copyright (c) 2018-2020. Developed by Hedgecode.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import org.junit.runners.JUnit4;
import org.hedgecode.chess.AbstractPositionTest;
-import org.hedgecode.chess.position.Parser;
+import org.hedgecode.chess.Parser;
import org.hedgecode.chess.position.Position;
/**
/*
- * Copyright (c) 2018-2019. Developed by Hedgecode.
+ * Copyright (c) 2018-2020. Developed by Hedgecode.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
package org.hedgecode.chess.qrcode;
+import org.hedgecode.chess.Parser;
import org.hedgecode.chess.Parsers;
+import org.hedgecode.chess.ParseException;
import org.hedgecode.chess.game.Game;
-import org.hedgecode.chess.position.ParseException;
-import org.hedgecode.chess.position.Parser;
import org.hedgecode.chess.position.Position;
/**