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

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

?? chessengineimpl.java

?? chess 一個beguanyu國際象棋的一個Java源碼
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
/*	ChessEngineImpl - A class to implement a engine to play chess.	Copyright (C) 2002,2003 Andreas Rueckert <mail@andreas-rueckert.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;import de.java_chess.javaChess.*;import de.java_chess.javaChess.bitboard.*;import de.java_chess.javaChess.board.*;import de.java_chess.javaChess.engine.hashtable.*;import de.java_chess.javaChess.engine.opening_book.*;import de.java_chess.javaChess.engine.opening_book.action.*;import de.java_chess.javaChess.engine.permanent_brain.*;import de.java_chess.javaChess.game.*;import de.java_chess.javaChess.notation.*;import de.java_chess.javaChess.ply.*;import de.java_chess.javaChess.renderer2d.EnginePanel;import de.java_chess.javaChess.renderer2d.StatusPanel;import de.java_chess.javaChess.listener.EngineStatusListener;import java.awt.event.*;import javax.swing.*;import java.util.Vector;import java.util.List;import java.util.ArrayList;import java.util.Iterator;import java.io.File;import java.io.PrintWriter;import java.io.FileWriter;import java.io.IOException;import java.io.FileNotFoundException;import java.io.BufferedOutputStream;import java.io.FileOutputStream;import java.io.BufferedReader;import java.io.FileReader;/** * This class implements the functionality to play the * actual game of chess */public class ChessEngineImpl implements ChessEngine, Runnable, ActionListener {    // Instance variables    /**     * The current game.     */    private Game _game;    /**     * The board to operate on.     */    private Board _board;    /**     * A analyzer for the boards.     */    private BitBoardAnalyzer _analyzer;    /**     * The maximum search depth.     */    private int _maxSearchTime = 5000;    /**     * Flag to indicate if the engine operates on the white pieces.     */    private boolean _white;    /**     * The generator for the plies.     */    private PlyGenerator _plyGenerator;    /**     * Flag to indicate, if the permanent brain function should be used.     */    private boolean _usePermanentBrain = false;    /**     * The permanent brain.     */    private PermanentBrain _permanentBrain;    /**     * The menu item to toggle the permanent brain.     */    private JCheckBoxMenuItem _permanentBrainMenuItem;    /**     * A hashtable for computed plies.     */    private PlyHashtable _hashtable;    /**     * The opening book.     */    private OpeningBook _openingBook;    /**     * Flag to indicate, if we are still in the opening book lines.     */    private boolean _inOpeningBook;    /**     * The currently used search depth.     */    private int _searchDepth;    /**     * A counter for the analyzed boards.     */    private long _analyzedBoards;    /**     * A thread to search for the best move.     */    private volatile Thread _searchThread;    /**     * Flag to stop the search.     */    private boolean _stopSearch;    /**     * The best computed ply so far.     */    private AnalyzedPly _bestPly = null;    /**     * The menu items for the various fix search times.     */    private JMenuItem [] _fixSearchTimeMenuItem;    /**     * The menu items for the various average search times.     */    private JMenuItem [] _avSearchTimeMenuItem;    /**     * The predefined search times (in seconds).     */    private int [] _searchTime = { 3, 5, 10, 15, 30, 45, 60};    /**     * The menu items for the various hashtable sizes.     */    private JMenuItem [] _hashtableSizeMenuItem;    /**     * The predefined hashtable sizes.     */    private int [] _hashtableSizes = { 5000, 10000, 20000, 50000, 100000 };    /**     * The menu items for the various search times.     */    private EnginePanel _enginePanel = null;    /**     * The menu items for the various search times.     */    private StatusPanel _statusPanel = null;    /**     * The last ply from the user.     */    Ply _lastUserPly = null;    /**     * The Logfile     */    File f;    /**     * The filename for the Logfile     */    private static final String LOG_FILENAME = "JCEngine.log";    /**     * The vector for buffering the existing lines from the Logfile     */    Vector vBuffer;    /**     * Flag that indicates if the chosen time control is fixed or average time     */    private boolean bFixedTime = true;    /**     * The ButtonGroup for the time controls     */    ButtonGroup buttonGroupSearchTime;    /**     * The ButtonGroup for the hash sizes     */    ButtonGroup buttonGroupHashSize;    /**     * The list of listeners     */    private List listeners;    // Constructors    /**     * Create a new engine instance with a given board.     *     * @param game The current game.     * @param notation The current notation.     * @param board The new board.     * @param white Flag, to indicate if the engine operates on the white pieces.     */    public ChessEngineImpl( Game game, GameNotation notation, Board board, boolean white)    {	listeners = new ArrayList();	this.createLogFile();	setGame( game);	setBoard( board);	setWhite( white);	_hashtable = new PlyHashtableImpl( 10000);	_plyGenerator = new PlyGenerator( getGame(), _hashtable);	_analyzer = new BitBoardAnalyzerImpl( getGame(), _plyGenerator);	_plyGenerator.setAnalyzer( _analyzer);	setPermanentBrain( new PermanentBrain( this));	startPermanentBrain();	setOpeningBook( new OpeningBookImpl( notation));	setInOpeningBook( true);    }    // Methods    /**     * Reset the engine for a new game.     */    public void reset() {	setInOpeningBook( true);  // Default is, that we are in the opening book.	getHashtable().reset();   // Reset the hash tables.	// Remove the engine status messages.	if( _enginePanel != null) {	    _enginePanel.setText("");	}	// After a reset, the user is about to move.	if ( this._statusPanel != null ) {	    this._statusPanel.setStatusText( "Your turn..." );	}	// Start the permanent brain, if the user wants it to be used.	startPermanentBrain();	// Reset the last user ply.	_lastUserPly = null;    }    /**     * Get the current game.     *     * @return The current game.     */    public final Game getGame() {	return _game;    }    /**     * Set the current game.     *     * @param The current game.     */    public final void setGame( Game game) {	_game = game;    }    /**     * Get the current board.     *     * @return The current board.     */    public Board getBoard() {	return _board;    }    /**     * Set the board.     *     * @param board The new board.     */    public void setBoard( Board board) {	_board = board;    }    /**     * Get the current hashtable for this ply generator.     *     * @return The current hashtable for this ply generator.     */    public final PlyHashtable getHashtable() {	return _hashtable;    }    /**     * Set a new hashtable for this ply generator.     *     * @param hashtable The new hashtable for this ply generator.     */    public final void setHashtable( PlyHashtable hashtable) {	_hashtable = hashtable;    }    /**     * Get the permanent brain.     *     * @return The permanent brain.     */    public final PermanentBrain getPermanentBrain() {	return _permanentBrain;    }    /**     * Set a new permanent brain.     *     * @param permanentBrain The new permanent brain.     */    private final void setPermanentBrain( PermanentBrain permanentBrain) {	_permanentBrain = permanentBrain;    }    /**     * Check, if the permanent brain should be used.     *     * @return A flag, that indicates, if the permanent brain should be used.     */    private final boolean usePermanentBrain() {	return _usePermanentBrain;    }    /**     * (De-)activate the permanent brain function.     *     * @param active Flag to indicate, if the permanent brain function should be used.     */    private final void activatePermanentBrain( boolean active) {	_usePermanentBrain = active;	// Since the permanent brain is eventually active already, stop it now.	if( ! usePermanentBrain()) {	    stopPermanentBrain();	}	// If the permanent brain is activated, it will be use for the next(!) move.    }    /**     * Get the maximum search time.     *     * @return The maximum search time.     */    public final int getMaximumSearchTime() {	return _maxSearchTime;    }    /**     * Set the maximum search time.     *     * @param depth The new search time.     */    public final void setMaximumSearchTime( int time) {	_maxSearchTime = time;    }    /**     * Get the color of this engine.     *     * @param white true, if the engine operates with the white pieces.     */    public boolean isWhite() {	return _white;    }    /**     * Set the color of the engine.     *     * @param white flag to indicate if the engine operates on the white pieces.     */    public void setWhite( boolean white) {	_white = white;    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产一本一道久久香蕉| 91在线视频官网| 中文天堂在线一区| 欧美精品高清视频| 99综合电影在线视频| 国产黄色精品视频| 久久成人精品无人区| 日韩成人伦理电影在线观看| 亚洲免费毛片网站| 亚洲男同性视频| 国产一区二区三区在线观看免费| 91亚洲精品一区二区乱码| 成人黄色在线看| 色一情一乱一乱一91av| 99re成人在线| 久久久久国色av免费看影院| 国产偷国产偷精品高清尤物| 国产欧美精品一区二区色综合朱莉| 精品国产不卡一区二区三区| 欧美videos中文字幕| 久久一夜天堂av一区二区三区| 2023国产一二三区日本精品2022| 夜夜嗨av一区二区三区四季av | 国产女人aaa级久久久级| 午夜精品免费在线| 亚洲午夜激情av| 免费成人av资源网| 国产99久久久国产精品潘金 | 成人av网站在线| 欧美精品一区二区不卡| 蜜臀av一区二区在线观看| 国产成人精品免费| 久久久久国产精品人| 国产精品一区二区91| 色噜噜夜夜夜综合网| 欧美一区二区大片| 国产精品网站在线播放| 国产精品一区二区在线播放| 久久一留热品黄| 粉嫩aⅴ一区二区三区四区五区 | 在线成人免费视频| 日本不卡中文字幕| 精品久久99ma| 国产在线不卡一区| 欧美激情一区二区三区四区| 夜色激情一区二区| 欧美四级电影在线观看| 精品久久久久久久一区二区蜜臀| 麻豆国产欧美一区二区三区| 精品1区2区在线观看| 国产成人自拍在线| 国产精品九色蝌蚪自拍| 美国一区二区三区在线播放| 26uuu久久综合| 成人一二三区视频| 欧美成人精品二区三区99精品| 美国av一区二区| 国产亚洲综合色| 99久久久久久| 日韩黄色免费电影| 在线一区二区视频| 免费看日韩精品| 久久影院电视剧免费观看| 成人av一区二区三区| 夜夜精品浪潮av一区二区三区| 欧美日韩精品一区二区| 一区二区三区中文在线| 欧美一级理论片| 亚洲va韩国va欧美va| 色婷婷综合久久久久中文| 亚洲午夜电影在线| 久久综合色8888| 色屁屁一区二区| 久久成人免费日本黄色| 亚洲摸摸操操av| 欧美一级搡bbbb搡bbbb| 99久久精品免费| 美国三级日本三级久久99| 综合久久综合久久| 色狠狠色狠狠综合| 久久99在线观看| 亚洲黄色免费电影| 欧美系列亚洲系列| 国产一区在线看| 日韩中文欧美在线| 国产精品福利影院| 精品乱人伦小说| 欧美日本视频在线| 国产99久久久精品| 另类欧美日韩国产在线| 亚洲综合色婷婷| 欧美日韩国产影片| www.99精品| 成人性生交大片免费看视频在线| 五月婷婷欧美视频| 《视频一区视频二区| 在线观看91视频| 免费观看在线综合| 亚洲综合区在线| 亚洲国产精品成人久久综合一区| 精品日韩在线一区| 欧美日韩国产综合一区二区三区| 不卡av在线网| 国产**成人网毛片九色 | 国产成人在线网站| 久久精品国产亚洲高清剧情介绍 | 欧美性三三影院| 成人黄色在线网站| 福利一区在线观看| 国产精品中文欧美| 极品美女销魂一区二区三区| 欧美激情在线一区二区| 久久久另类综合| 久久久国产精华| 精品久久久久久无| 久久亚洲精精品中文字幕早川悠里 | 在线观看91精品国产入口| 91麻豆成人久久精品二区三区| 国产69精品久久久久毛片| 精品在线一区二区| 久久国产精品99久久久久久老狼| 蜜桃91丨九色丨蝌蚪91桃色| 日韩电影免费在线观看网站| 日韩电影在线免费| 美女在线视频一区| 国产一区二区在线电影| 国产一区二区调教| 成人午夜在线播放| 97aⅴ精品视频一二三区| 99re成人精品视频| 欧美日韩在线一区二区| 成人综合在线网站| 99re热这里只有精品免费视频| 91在线观看一区二区| 91久久精品一区二区三| 欧美精品成人一区二区三区四区| 91精品国产91久久久久久最新毛片 | 久久免费精品国产久精品久久久久| 欧美一区二区精品久久911| 欧美成人官网二区| 国产日本欧美一区二区| 樱桃视频在线观看一区| 欧美bbbbb| 成人性视频网站| 欧美日本一道本在线视频| 精品国产一区二区三区久久久蜜月| 久久在线观看免费| 一区二区三区不卡视频| 老司机精品视频一区二区三区| 国产99一区视频免费| 欧美在线观看一区二区| 51精品视频一区二区三区| 91免费版在线看| 91精品国产综合久久精品图片| 日韩欧美区一区二| 日韩一区二区三区电影在线观看| 久久亚洲一级片| 亚洲电影视频在线| 国产成人免费av在线| 91久久精品日日躁夜夜躁欧美| 日韩一区二区高清| 中文字幕一区二区三区视频 | 一级中文字幕一区二区| 美国十次了思思久久精品导航| 国产91精品免费| 欧美日韩一区二区三区在线| 日韩精品中午字幕| 国产精品国产三级国产aⅴ中文| 亚洲国产精品久久人人爱| 国产一区二区精品久久91| 欧洲精品视频在线观看| 日本一区二区在线不卡| 天堂一区二区在线| 色婷婷综合激情| 国产精品欧美久久久久无广告| 三级精品在线观看| 91麻豆自制传媒国产之光| 欧美精品一区二区三区在线播放| 亚洲一区在线观看免费观看电影高清 | www.性欧美| 精品国产成人在线影院| 日韩精品色哟哟| 91久久一区二区| 国产精品麻豆99久久久久久| 免费成人在线观看| 欧美色老头old∨ideo| 中文字幕一区二区三区在线不卡| 国产精品自产自拍| 欧美成人aa大片| 日本中文在线一区| 欧美三级电影精品| 亚洲国产中文字幕在线视频综合 | 欧美日韩综合在线免费观看| 国产精品久久久久久妇女6080 | 天堂久久一区二区三区| 欧美天天综合网| 亚洲国产aⅴ成人精品无吗| 99视频在线精品| 国产精品久99| 色一情一乱一乱一91av|