亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? openingbookimpl.java

?? chess 一個beguanyu國際象棋的一個Java源碼
?? JAVA
字號:
/*  OpeningBookImpl - A implementation of the OpeningBook interface.  Copyright (C) 2003 The Java-Chess team <info@java-chess.de>  This program is free software; you can redistribute it and/or  modify it under the terms of the GNU General Public License  as published by the Free Software Foundation; either version 2  of the License, or (at your option) any later version.  This program is distributed in the hope that it will be useful,  but WITHOUT ANY WARRANTY; without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License for more details.  You should have received a copy of the GNU General Public License  along with this program; if not, write to the Free Software  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.*/ package de.java_chess.javaChess.engine.opening_book;import antlr.*;import de.java_chess.javaChess.notation.*;import de.java_chess.javaChess.pgn.*;import de.java_chess.javaChess.ply.*;import java.io.*;import java.util.*;import javax.swing.*;/** * This class implements a opening book. */public class OpeningBookImpl implements OpeningBook {    // Instance variables    /**     * The current game.     */    private GameNotation _notation = null;    /**     * All the known openings with their notations.     */    private ArrayList _openings;    /**     * The index of the currently used opening.     */    private int _currentOpening;        // Constructors        /**     * Create a new instance of this class.     *     * @param notation The notation of the current game.     */    public OpeningBookImpl( GameNotation notation) {	setNotation( notation);	// Create a new dynamic array for the openings.	_openings = new ArrayList();  	// Reset the opening book.	reset();    }    // Methods    /**     * The user just did a ply.     *     * @param ply The user ply.     */    public final void doUserPly( Ply ply) {	// If we are already in a opening, check if the current user	// move doesn't lead us out of the opening line.	if( _currentOpening != -1) {	    if( ! isInOpening( _currentOpening)) {		_currentOpening = -1;	    }	}    }    /**     * Get the next ply from the opening book, if there is     * one available, or null if not.     *     * @return The next ply from the opening book, or null      *         if there's no ply available.     */    public final AnalyzedPly getOpeningBookPly() {	// If we have no opening yet, try to find one.	if( _currentOpening == -1) {	    _currentOpening = findOpening();	}		// Check, if we have found a opening.	if( _currentOpening != -1) {	    // Check, if we have another ply in the opening.	    int pliesMade = _notation.size();	    GameNotation currentOpening = (GameNotation)( _openings.get( _currentOpening));	    if( currentOpening.size() > pliesMade) {		return new AnalyzedPlyImpl( currentOpening.getPlyNotation( pliesMade).getPly(), (short)0);	    }	}	return null; // No ply found in the available opening books.    }    /**     * Reset the opening book to the initial piece position.     */    public final void reset() {	_currentOpening = -1;    }    /**     * Add a opening in PGN format to the opening book and return     * the error status.     *     * @param file The File to add to the opening book.     */    public final void addPGNopening( File file) {	try {	    PGNFile pgnFile = new PGNFile( new BufferedReader( new FileReader( file)));	    GameNotation notation = pgnFile.readGame();	    _openings.add( notation);	    // System.out.println( "DEBUG: added opening \n" + notation.toString());	} catch( FileNotFoundException fe) {	    JOptionPane.showMessageDialog( null, "File " + file.getName() + " not found!", "File not found", JOptionPane.ERROR_MESSAGE);	} catch( IOException ioe) {	    JOptionPane.showMessageDialog( null, "IO error while parsing file " + file.getName() + "!", "IO error", JOptionPane.ERROR_MESSAGE);	} catch( RecognitionException re) {	    JOptionPane.showMessageDialog( null, "Error while parsing file " + file.getName() + "!", "Error in PGN file", JOptionPane.ERROR_MESSAGE);	} catch( TokenStreamException te) { 	    System.err.print("Tokenstream exception"); 	}    }    /**     * Try to find a opening for the current game notation.     *     * @return The index of the found opening.     */    private final int findOpening() {	for( int i = 0; i < _openings.size(); i++) {	    if( isInOpening( i)) {		return i;	    }	}	return -1;  // No opening found.    }    /**     * Check, if the current game notation is part of a given opening.     *     * @param openingIndex The index of the opening to test.     */    private final boolean isInOpening( int openingIndex) {	GameNotation notation = (GameNotation)_openings.get( openingIndex);	// If the current game has more plies, than the opening, we can return	// false.	if( _notation.size() > notation.size()) {	    return false;	}	// Compare the notation ply by ply, which is rather slow, but should work	// for now.	for( int i = 0; i < _notation.size(); i++) {	    if( ! _notation.getPlyNotation( i).getPly().equals( notation.getPlyNotation( i).getPly())) {		return false;	    }	}	// The current game uses the given opening.	return true;    }    /**     * Get the notation of the current game.     *     * @return The notation of the current game.     */    private final GameNotation getNotation() {	return _notation;    }    /**     * Set the notation of the current game.     *     * @param notation The notation of the current game.     */    private final void setNotation( GameNotation notation) {	_notation = notation;    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕一区二区三区四区不卡 | 亚洲国产一区二区a毛片| 国产婷婷精品av在线| 国产亚洲精品超碰| 日本久久电影网| 国产精品午夜在线| 久久久久久久一区| 久久精品视频一区二区| 欧美国产欧美综合| 国产精品夫妻自拍| 一区二区三区国产精华| 亚洲午夜在线电影| 奇米精品一区二区三区在线观看一 | 理论片日本一区| 蜜臀久久久久久久| 韩国视频一区二区| 91在线国产观看| 欧美日韩国产一级二级| 日韩免费看网站| 久久久亚洲高清| 亚洲欧美国产高清| 蜜桃久久久久久久| 成人免费视频视频在线观看免费| 91国偷自产一区二区三区观看| 91精品国产一区二区| 亚洲国产精品成人久久综合一区| 国产精品三级在线观看| 亚洲国产一二三| 国产成a人无v码亚洲福利| 91福利视频在线| 欧美精品一区二区三区很污很色的 | 国产精品高潮久久久久无| 亚洲一区二区三区影院| 国产乱码精品一区二区三| 99久久精品国产观看| 日韩欧美成人午夜| 亚洲免费av高清| 狠狠网亚洲精品| 欧美视频在线观看一区二区| 国产午夜亚洲精品理论片色戒 | 一本大道久久a久久综合婷婷| 91麻豆精品国产无毒不卡在线观看| 久久午夜色播影院免费高清| 亚洲成人av免费| www.日韩在线| 2023国产精华国产精品| 午夜成人免费视频| av不卡在线观看| 久久精品亚洲精品国产欧美 | 成人午夜av影视| 精品美女在线播放| 亚洲宅男天堂在线观看无病毒| 国产99精品在线观看| 欧美电视剧在线观看完整版| 亚洲色图欧美激情| 成人黄色电影在线 | 国产精品青草综合久久久久99| 日韩电影在线一区二区三区| 日本高清无吗v一区| 国产精品理伦片| 国产精品亚洲综合一区在线观看| 91麻豆精品国产91久久久久| 依依成人精品视频| 99re热这里只有精品视频| 国产午夜亚洲精品理论片色戒| 久久国产尿小便嘘嘘| 制服丝袜成人动漫| 午夜精品视频一区| 欧美欧美欧美欧美首页| 亚洲国产综合在线| 欧美三级一区二区| 亚洲成人精品影院| 欧美一区二区三区在线观看视频| 亚洲成人高清在线| 欧美精品色一区二区三区| 亚洲成人精品一区| 欧美老女人第四色| 日韩高清不卡一区二区| 日韩久久精品一区| 国产99一区视频免费 | 洋洋av久久久久久久一区| 日本道在线观看一区二区| 亚洲精品欧美综合四区| 欧美影片第一页| 午夜欧美一区二区三区在线播放 | 奇米在线7777在线精品| 日韩欧美在线综合网| 精品一区二区三区在线观看| 欧美精品一区男女天堂| av资源站一区| 一区二区三区产品免费精品久久75| 91黄色免费版| 青青草国产精品97视觉盛宴| 久久这里都是精品| av成人免费在线观看| 亚洲一区中文日韩| 日韩精品一区二区三区四区| 国产精品一区二区在线看| 国产精品理论片| 精品视频在线免费看| 久久精品国产99国产精品| 欧美激情一区二区三区不卡| 欧美性xxxxx极品少妇| 久久国产视频网| 亚洲欧美日韩国产另类专区 | 国产不卡免费视频| 亚洲欧美日韩国产成人精品影院| 欧美疯狂做受xxxx富婆| 国产不卡一区视频| 午夜欧美一区二区三区在线播放| 国产日韩欧美不卡在线| 欧美日韩一区高清| 国产成人亚洲综合a∨婷婷| 亚洲国产另类av| 欧美国产日产图区| 日韩小视频在线观看专区| 不卡电影一区二区三区| 麻豆成人在线观看| 亚洲精品五月天| 精品999在线播放| 欧洲一区二区三区在线| 国产不卡视频一区| 日本伊人色综合网| 一区二区三区四区激情 | 亚洲美女偷拍久久| 久久蜜桃一区二区| 91精品国产综合久久婷婷香蕉 | 久久久噜噜噜久久人人看| 欧美日韩亚州综合| 99视频超级精品| 国产精品一色哟哟哟| 日产精品久久久久久久性色| 亚洲欧美激情一区二区| 亚洲精品一区二区三区四区高清| 欧美乱妇15p| 在线视频国内一区二区| 粉嫩av一区二区三区在线播放| 久久精品999| 免费在线观看视频一区| 亚洲国产精品久久久男人的天堂| 国产精品福利一区| 国产精品国产自产拍高清av | 91精品国模一区二区三区| 欧美性大战久久久久久久蜜臀| 色综合久久九月婷婷色综合| 顶级嫩模精品视频在线看| 精品亚洲免费视频| 久久99精品久久久久久久久久久久| 手机精品视频在线观看| 亚洲1区2区3区视频| 亚洲五月六月丁香激情| 夜夜夜精品看看| 亚洲成人福利片| 偷偷要91色婷婷| 日日骚欧美日韩| 男女性色大片免费观看一区二区 | 欧美影院一区二区三区| 欧美主播一区二区三区| 欧美体内she精高潮| 欧美日韩不卡一区二区| 欧美一区二区啪啪| 欧美成人精品高清在线播放 | 一区二区三区在线视频免费| 亚洲欧美日韩在线不卡| 一区二区激情小说| 日本成人中文字幕| 国产剧情一区二区| 国产成人精品影视| 一本久久精品一区二区| 欧美日韩成人综合| 欧美电影免费观看高清完整版在线| 精品国产sm最大网站免费看| 久久久久久久精| 亚洲精品videosex极品| 午夜精品久久久久久久99水蜜桃 | 在线精品亚洲一区二区不卡| 欧美日本乱大交xxxxx| 日韩视频一区在线观看| 国产女同性恋一区二区| 亚洲裸体在线观看| 日韩高清在线不卡| 成人免费视频caoporn| 日本高清不卡一区| 日韩精品中文字幕在线一区| 国产性色一区二区| 亚洲成人av中文| 国产.精品.日韩.另类.中文.在线.播放| 顶级嫩模精品视频在线看| 欧美日韩国产欧美日美国产精品| 日韩欧美国产三级电影视频| 国产精品久久久久影院老司| 奇米四色…亚洲| 91污在线观看| 日韩欧美一区二区免费| 亚洲欧美日韩国产手机在线| 精品一区二区三区视频| 91国产视频在线观看| 国产亚洲综合av| 日韩中文字幕不卡| 91浏览器在线视频|