亚洲欧美第一页_禁久久精品乱码_粉嫩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精品国产一区二区三区| 中文字幕在线不卡一区| 国产精品每日更新在线播放网址| 麻豆成人久久精品二区三区红| 欧洲亚洲国产日韩| 欧美韩日一区二区三区| 国产成人免费视频网站| 精品国产乱码久久久久久图片 | 91麻豆精品在线观看| 欧美一区二区三区视频在线观看| 亚洲天天做日日做天天谢日日欢| 国产一区二区三区精品欧美日韩一区二区三区| 国产激情一区二区三区四区| 91精品国产手机| 国产精品三级电影| 国产白丝精品91爽爽久久| 欧美成人猛片aaaaaaa| 免费在线成人网| 777午夜精品免费视频| 日韩av网站免费在线| 欧美性感一区二区三区| 一区二区三区四区高清精品免费观看 | 91精品在线麻豆| 日本成人超碰在线观看| 欧美一级国产精品| 国产精品2024| 中文字幕va一区二区三区| 成人免费va视频| 偷拍一区二区三区| 成人动漫视频在线| 亚洲精品美国一| 在线不卡a资源高清| 久久爱www久久做| 国产亚洲福利社区一区| 91网上在线视频| 午夜天堂影视香蕉久久| 欧美大片拔萝卜| 精品在线免费视频| 中文字幕欧美一区| 在线播放一区二区三区| 国产一区二区在线观看免费| 国产精品区一区二区三区| 一本到不卡精品视频在线观看| 亚洲午夜在线观看视频在线| 欧美日韩一区二区三区四区| 国产呦精品一区二区三区网站| 国产精品久久久久影视| 欧美日韩免费视频| 国产一区在线精品| 亚洲在线观看免费| 精品成人私密视频| 白白色 亚洲乱淫| 美日韩一区二区三区| 亚洲品质自拍视频| 久久久亚洲高清| 欧美午夜在线一二页| 成人av电影免费观看| 经典一区二区三区| 亚洲乱码一区二区三区在线观看| 日韩美一区二区三区| 欧美性生活大片视频| 成人免费视频视频在线观看免费| 日本亚洲最大的色成网站www| 亚洲色图视频免费播放| 欧美精品久久天天躁| 99精品黄色片免费大全| 国产在线精品一区二区夜色| 天堂一区二区在线| 亚洲sss视频在线视频| 国产精品福利一区二区三区| 久久久久国色av免费看影院| 91麻豆精品国产综合久久久久久| 欧美亚洲动漫精品| 色综合久久综合网97色综合| 成人精品小蝌蚪| 9久草视频在线视频精品| 国产成人一区在线| 成人免费视频国产在线观看| 国内精品久久久久影院色| 日韩va亚洲va欧美va久久| 日韩专区一卡二卡| 蜜臀久久99精品久久久久久9| 日韩 欧美一区二区三区| 男男成人高潮片免费网站| 激情综合色丁香一区二区| 久久精品理论片| 粉嫩av一区二区三区粉嫩| 99精品久久99久久久久| 在线观看一区日韩| 欧美日韩国产经典色站一区二区三区| 欧美在线你懂得| 欧美一区二区视频网站| 国产午夜精品美女毛片视频| 久久久久国色av免费看影院| 国产精品国产a| 欧美日韩久久久一区| 久久综合久久久久88| 国产精品国产精品国产专区不片| 亚洲妇女屁股眼交7| 国产乱码精品一区二区三区忘忧草 | 5月丁香婷婷综合| 国产精品免费久久久久| 国产一区二区三区蝌蚪| 国产大片一区二区| 欧美日韩在线免费视频| 久久人人97超碰com| 亚洲欧美怡红院| 精品一区二区综合| 欧美伊人久久久久久久久影院| 日韩一区二区三区av| 日韩美女视频19| 国内外成人在线视频| 色欧美日韩亚洲| 国产亚洲污的网站| 久久国产精品99久久久久久老狼| 91女厕偷拍女厕偷拍高清| 日韩一区二区在线观看| 亚洲精品菠萝久久久久久久| 久久99精品一区二区三区| 欧美色偷偷大香| 一区二区免费在线播放| 中文幕一区二区三区久久蜜桃| 久久99久久99精品免视看婷婷| 在线免费观看一区| 一区二区三区四区乱视频| 99免费精品视频| 亚洲少妇中出一区| 成人动漫av在线| 日本一区二区视频在线观看| 久久99国内精品| 日韩欧美亚洲另类制服综合在线 | 成人一二三区视频| 久久久久国色av免费看影院| 久久99精品一区二区三区三区| 欧美一区二区在线免费观看| 在线观看视频91| 亚洲精品国产一区二区精华液| 欧美在线免费播放| 青青草原综合久久大伊人精品| 2023国产精品| 91女人视频在线观看| 日本sm残虐另类| 国产精品午夜电影| 欧美一区二区在线免费播放| 国产精品 欧美精品| 亚洲小说春色综合另类电影| 日韩欧美中文字幕精品| 欧美色图免费看| 麻豆成人久久精品二区三区小说| 国产亚洲自拍一区| 91麻豆国产香蕉久久精品| 精品一二线国产| 亚洲一级二级三级| 精品福利二区三区| 欧美日韩色一区| 99久久精品免费观看| 久久精品国产久精国产| 亚洲欧美日韩一区二区| 精品久久五月天| 在线观看国产精品网站| 国产福利91精品一区二区三区| 一区二区三区日韩精品视频| 欧美xxxxxxxxx| 欧美日韩国产小视频在线观看| 国产成人精品综合在线观看| 日韩精彩视频在线观看| 一区二区日韩av| 亚洲精选视频免费看| 国产女主播视频一区二区| 欧美成人免费网站| 日韩一级二级三级| 欧美丰满少妇xxxbbb| 色偷偷久久一区二区三区| 激情五月播播久久久精品| 性感美女极品91精品| 国产精品无人区| 欧美国产综合色视频| 国产女人aaa级久久久级| 国产视频一区二区在线| 337p粉嫩大胆噜噜噜噜噜91av| 日韩欧美中文一区| 2020国产精品自拍| 久久久综合视频| 亚洲国产精品v| 亚洲免费观看视频| 亚洲影视资源网| 婷婷夜色潮精品综合在线| 免费一区二区视频| 国产精品资源网| www.欧美.com| 在线视频中文字幕一区二区| 欧美日韩亚洲综合在线| 宅男噜噜噜66一区二区66| 欧美成人a在线| 国产精品欧美久久久久一区二区 | 欧美一级久久久| 国产日产欧产精品推荐色 | 国产精品麻豆99久久久久久|