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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? permanentbrain.java

?? chess 一個beguanyu國際象棋的一個Java源碼
?? JAVA
字號:
/*  PermanentBrain - Implements a permanent brain, that                   computes plies, while the human player                   is thinking.  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.permanent_brain;import de.java_chess.javaChess.bitboard.*;import de.java_chess.javaChess.board.*;import de.java_chess.javaChess.engine.*;import de.java_chess.javaChess.ply.*;/** * This class implements a permanent brain, that computes * plies, while the human player is thinking. */public class PermanentBrain implements Runnable {    // Instance variables    /**     * The potential next moves of the human player.     */    private Ply [] _userPlies;    /**     * The computed responses to the user plies.     */    private PreComputedPly [] _computedPlies = null;    /**     * The used chess engine.     */    private ChessEngine _engine;    /**     * The search thread for the plies.     */    private volatile Thread _searchThread = null;    // Constructors    /**     * Create a new PermanentBrain instance.     *     * @param engine The used chess engine.     */    public PermanentBrain( ChessEngine engine) {	setEngine( engine);    }    // Methods    /**     * Get the current chess engine.     *     * @return The current chess engine.     */    private final ChessEngine getEngine() {	return _engine;    }    /**     * Set a new chess engine.     *     * @param engine The new chess engine.     */    private final void setEngine( ChessEngine engine) {	_engine=engine;    }    /**     * Reset (remove) the user plies.     */    public final void resetUserPlies() {	_userPlies=null;    }    /**     * Get the potential plies for a user.     * (Required to validate a user ply.)     *     * @return The potential plies for a user.     */    public final Ply [] getUserPlies() {	// Lazy computation for better performance.	if( _userPlies == null) {	    _userPlies = getEngine().getUserPlies();	}	return _userPlies;  // Return the user plies.    }    /**     * Get the response for a user ply.     *     * @param ply The ply of the human player.     *     * @return The precomputed response for the user ply.     */    public final PreComputedPly getPlyForUserPly( Ply ply) {	if( _computedPlies != null) {	    // Stop the computation 	    // (but should already be done by the game controller)	    stopComputation();	    // Get the index of the user ply.	    Ply [] userPlies = getUserPlies();	    int plyCount = userPlies.length;	    for( int i=0; i < plyCount; i++) {		if( userPlies[i].equals( ply)) {		    		    // i holds the index of the user ply now, which equals the		    // index of the computed response.		    return _computedPlies[i];		}	    }	}	return null;    }    /**     * Stop the computation of a response to the next user ply.     */    public final void stopComputation() {	if( _searchThread != null) {	    Thread savedThread = _searchThread;  // Save the thread.	    ( (ChessEngineImpl)getEngine()).setSearchStop( true);	    _searchThread = null;                // Signal to finish.	    try {	        savedThread.join();                      // Use the copy to wait 	    } catch( InterruptedException ignored) {}    // for the thread to finish.	}    }    /**     * Start the computation of a response to the next user ply.     */    public final void startComputation() {	// Stop the computation, if it was a reset.	stopComputation();	// Reset the permanent brain for the next user move.	resetUserPlies();	_computedPlies = new PreComputedPly[ getUserPlies().length];	if( _searchThread == null) {  // Should always be null	    _searchThread = new Thread( this);	    _searchThread.start();	}    }    /**     * The actual search method.     */    public void run() {		// Start with search depth 1	( (ChessEngineImpl)getEngine()).setSearchDepth( 1);	// Save the current board of the actual game.	Board currentBoard = getEngine().getBoard();  // No clone() required at the moment.	// Get the user plies as a local variable.	Ply [] userPlies = getUserPlies();	// Let the minimax search run through.	( ( ChessEngineImpl)getEngine()).setSearchStop( false);	// Reset the number of analyzed boards.	( (ChessEngineImpl)getEngine()).setAnalyzedBoards( 0L);	while( _searchThread == Thread.currentThread()) {	    	    // Go through all the user plies and compute a response.	    for( int i=0; ( i < userPlies.length) && ( _searchThread == Thread.currentThread()); i++) {		getEngine().setBoard( currentBoard.getBoardAfterPly( userPlies[i]));		try {		    _computedPlies[i] = new PreComputedPlyImpl( ( (ChessEngineImpl)getEngine()).startMinimaxAlphaBeta( getEngine().isWhite())								, ( (ChessEngineImpl)getEngine()).getSearchDepth());		} catch( InterruptedException ignored) {		    _computedPlies[i] = null;		}	    }	    // Increase the search depth and continue with another run.	    ( (ChessEngineImpl)getEngine()).increaseSearchDepth();	}	// Restore the current board.	getEngine().setBoard( currentBoard);    }}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品国产综合久久久蜜臀粉嫩| 成人美女视频在线观看| 欧美日韩一区成人| 婷婷久久综合九色国产成人| 欧美日韩精品二区第二页| 天堂av在线一区| 日韩一区二区免费在线观看| 国内欧美视频一区二区| 中文字幕一区日韩精品欧美| 91福利资源站| 免费观看在线综合| 中文字幕av资源一区| 色丁香久综合在线久综合在线观看| 亚洲一区av在线| 精品国产亚洲在线| 不卡av在线免费观看| 亚洲电影在线免费观看| xvideos.蜜桃一区二区| 波多野结衣一区二区三区| 五月天激情综合| 久久婷婷成人综合色| 91丝袜高跟美女视频| 日韩高清一区二区| 国产精品欧美精品| 欧美精品 日韩| www.色综合.com| 日韩和欧美一区二区三区| 国产无人区一区二区三区| 91福利视频在线| 紧缚奴在线一区二区三区| 综合欧美亚洲日本| 日韩精品一区二区三区视频在线观看| 不卡视频一二三| 蜜臀av性久久久久蜜臀av麻豆 | 欧美放荡的少妇| 激情综合五月天| 亚洲日本欧美天堂| 欧美大白屁股肥臀xxxxxx| 色综合久久综合网97色综合| 久久精品国产999大香线蕉| 一区二区三区 在线观看视频| 日韩免费看的电影| 色婷婷综合五月| 韩国欧美国产1区| 午夜在线电影亚洲一区| 国产精品视频一二三| 日韩欧美一二区| 在线观看中文字幕不卡| 成人黄色av网站在线| 美女视频黄频大全不卡视频在线播放| 国产精品久久久久久久久久久免费看 | 日韩一区二区三区视频| 99久久久久久99| 国产一区二区中文字幕| 奇米影视7777精品一区二区| 亚洲精品第一国产综合野| 国产精品色婷婷| 久久久国产精华| 日韩一区二区精品在线观看| 欧美三级一区二区| 在线精品视频免费播放| 91看片淫黄大片一级| 成人国产精品免费观看视频| 国产激情精品久久久第一区二区 | 99精品视频在线观看免费| 日本不卡一区二区| 午夜精品久久久久久久99水蜜桃| 亚洲色图在线视频| 亚洲欧洲成人av每日更新| 国产精品麻豆久久久| 亚洲国产精品传媒在线观看| 中文字幕一区在线| 精品视频免费在线| 99re在线视频这里只有精品| 国产精品一区二区久久不卡| 亚洲综合一区二区| 欧美在线观看禁18| 精品免费国产二区三区| 国产精品99久久久久久宅男| 国内精品自线一区二区三区视频| 九九久久精品视频| 国产主播一区二区| 国产精品一区二区91| 丁香五精品蜜臀久久久久99网站 | 午夜欧美2019年伦理| 亚洲bt欧美bt精品777| 免费看日韩精品| 精品亚洲国产成人av制服丝袜 | 不卡电影一区二区三区| 99精品黄色片免费大全| 色婷婷综合久久| 精品视频在线看| 欧美成人精精品一区二区频| 欧美精品一区在线观看| 精品免费一区二区三区| 成人涩涩免费视频| 一区二区久久久久| 日日摸夜夜添夜夜添精品视频| 免费高清视频精品| 国产电影一区在线| 色综合天天综合色综合av | 亚洲国产乱码最新视频| 日本特黄久久久高潮| 国产精品系列在线播放| 色婷婷狠狠综合| 欧美一级片在线看| 亚洲国产精品国自产拍av| 亚洲尤物视频在线| 久久99日本精品| 91视视频在线观看入口直接观看www| 欧美中文字幕亚洲一区二区va在线| 在线电影国产精品| 久久精品一区八戒影视| 亚洲韩国一区二区三区| 国内精品在线播放| 欧美体内she精高潮| 精品处破学生在线二十三| 亚洲欧美日韩中文字幕一区二区三区| 亚洲成人免费视频| 国产亚洲va综合人人澡精品| 一区二区三区四区激情| 欧美日韩中字一区| 久久综合久久综合久久综合| 亚洲欧美一区二区三区久本道91| 午夜亚洲国产au精品一区二区| 久久99国产精品久久99 | 麻豆91在线看| 色综合久久综合| 久久一日本道色综合| 香蕉成人伊视频在线观看| 99久久综合色| 亚洲精品一区二区三区蜜桃下载 | 国产精品免费久久久久| 日韩av午夜在线观看| 99久久精品国产一区二区三区| 日韩免费高清视频| 亚洲国产日产av| 91色.com| 国产精品女主播av| 国产乱码精品一区二区三区av| 欧美日韩亚洲综合在线 | 欧美性xxxxxx少妇| 亚洲精品在线观看网站| 亚洲第一av色| 91蝌蚪porny九色| 国产女人aaa级久久久级 | 亚洲福利国产精品| av影院午夜一区| 欧美国产成人在线| 精品亚洲成av人在线观看| 欧美剧在线免费观看网站| 伊人婷婷欧美激情| 成人免费精品视频| 国产欧美精品一区二区三区四区| 美日韩一区二区| 欧美精品电影在线播放| 亚洲最新在线观看| 一本久道久久综合中文字幕| 国产精品久线观看视频| 国产成人精品在线看| 久久久午夜精品理论片中文字幕| 麻豆精品视频在线观看| 日韩一区二区高清| 精品一区二区三区日韩| 日韩精品一区在线| 国产高清一区日本| 欧美日韩亚洲国产综合| 91精品国产欧美一区二区成人| 亚洲不卡一区二区三区| 欧美色精品在线视频| 午夜视频一区二区三区| 欧美高清视频一二三区| 天堂va蜜桃一区二区三区| 91精品国产综合久久小美女| 美女网站色91| 久久久精品国产免大香伊| 国产精品资源在线观看| 国产拍欧美日韩视频二区| 成人av资源下载| 最近中文字幕一区二区三区| 一本大道久久a久久综合婷婷| 亚洲一二三四在线| 日韩欧美激情在线| 国产精品一区免费视频| 国产精品久久精品日日| 色婷婷综合五月| 日韩电影在线免费看| 精品国产第一区二区三区观看体验 | 欧美日韩亚洲综合一区二区三区| 五月婷婷另类国产| 日韩欧美的一区| 成人小视频在线| 一区二区三区鲁丝不卡| 制服丝袜亚洲色图| 国产一区在线视频| 亚洲综合一二区| 精品裸体舞一区二区三区| 国产1区2区3区精品美女| 亚洲精品成人天堂一二三| 欧美一区二区观看视频|