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

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

?? chessengineimpl.java

?? chess 一個(gè)beguanyu國(guó)際象棋的一個(gè)Java源碼
?? JAVA
?? 第 1 頁 / 共 3 頁
字號(hào):
		return true;                      // ply, it seems to be valid.	    }	}	// The computer could not compute the ply, the user has made,	// so we assume, that it is not valid.	System.out.println( "Invalid move " + ply.toString());	System.out.println( "Piecetype on source square " + ( getBoard().getPiece( ply.getSource()) == null ? "null" : "" + getBoard().getPiece( ply.getSource()).getType()));	System.out.println( "Piecetype on destination square " + ( getBoard().getPiece( ply.getDestination()) == null ? "null" : "" + getBoard().getPiece( ply.getDestination()).getType()));	System.out.println( "Valid moves are:");	for( int p = 0; p < plies.length; p++) {  // For each ply	    System.out.print( plies[p].toString() + " ");	}	System.out.println();	return false;    }    /**     * Start the computations of the permanent brain.     */    public final void startPermanentBrain() {	// If the permanent brain is active.	if( usePermanentBrain()) {	    getPermanentBrain().startComputation();	} else {	    // Since the permanent brain cannot reset the counter,	    // I do it here.	    setAnalyzedBoards( 0L);	}    }    /**     * Stop the computations of the permanent brain.     */    public final void stopPermanentBrain() {	getPermanentBrain().stopComputation();    }    /**     * Set the the stop flag for the search.     *     * @param stopFlag The flag to stop the search engine.     */    public final void setSearchStop( boolean stopFlag) {	_stopSearch = stopFlag;    }    /**     * Check, if a search should be stopped.     *     * @return true, if the search should be stopped.     */    public final boolean isSearchStop() {	return _stopSearch;    }    /**     * Get the number of analyzed boards.     *     * @return The number of analyzed boards.     */    public final long getAnalyzedBoards() {	return _analyzedBoards;    }    /**     * Set the number of analyzed boards.     *     * @param analyzedBoards The new number of analyzed boards.     */    public final void setAnalyzedBoards( long analyzedBoards) {	_analyzedBoards = analyzedBoards;    }    /**     * Increase the number of analyzed boards by 1.     */    public final void increaseAnalyzedBoards() {	_analyzedBoards++;    }    /**     * Get the current search depth.     *     * @return The current search depth.     */    public final int getSearchDepth() {	return _searchDepth;    }    /**     * Set a new search depth.     *     * @param searchDepth The new search depth.     */    public final void setSearchDepth( int searchDepth) {	_searchDepth = searchDepth;    }    /**     * Increase the search depth by 1.     */    public final void increaseSearchDepth() {	_searchDepth++;    }    /**     * Decrease the search depth by 1.     */    public final void decreaseSearchDepth() {	_searchDepth--;    }    /**     * Return a menu from the chess engine, where the user     * can change the settings.     *     * @return A menu for the engine settings.     */    public final JMenu getMenu() {	// Create a new menu.	JMenu engineMenu = new JMenu( "Engine");	// Add a toggle item for to the permanent brain.	engineMenu.add( _permanentBrainMenuItem = new JCheckBoxMenuItem( "Use permanent brain", usePermanentBrain()));	_permanentBrainMenuItem.addActionListener( this);	// Add a menu for the maximum search time	JMenu searchTimeMenu = new JMenu( "Search time");	// Add a sub-menu for fixed time.	JMenu searchTimeSubMenuFix = new JMenu( "Fixed time");	// Add a sub-menu for average time.	JMenu searchTimeSubMenuAv = new JMenu( "Average time");	// Add various options for the fixed search time	// (maybe a user defined search time should be added, too).	buttonGroupSearchTime = new ButtonGroup();	_fixSearchTimeMenuItem = new JRadioButtonMenuItem[ _searchTime.length ];	for( int st = 0; st < _searchTime.length; st++) {	    _fixSearchTimeMenuItem[ st ] = new JRadioButtonMenuItem( "" + _searchTime[ st ] + " seconds");	    _fixSearchTimeMenuItem[ st ].addActionListener( this );	    if ( _searchTime[ st ] == 5 )		{ // set initially 5 sec max search time:		    _fixSearchTimeMenuItem[ st ].setSelected( true );		    this.setMaximumSearchTime( 5000 );		}	    buttonGroupSearchTime.add(_fixSearchTimeMenuItem[st]);	    // Add the current search time menu item to it's menu.	    searchTimeSubMenuFix.add( _fixSearchTimeMenuItem[ st ] );	}	// Add various options for the average search time	_avSearchTimeMenuItem = new JRadioButtonMenuItem[ _searchTime.length ];	for( int st = 0; st < _searchTime.length; st++) {	    _avSearchTimeMenuItem[ st ] = new JRadioButtonMenuItem( "" + _searchTime[ st ] + " seconds");	    _avSearchTimeMenuItem[ st ].addActionListener( this );	    // Add the current search time menu item to it's menu.	    searchTimeSubMenuAv.add( _avSearchTimeMenuItem[ st ]);	    buttonGroupSearchTime.add(_avSearchTimeMenuItem[st]);	}	searchTimeMenu.add( searchTimeSubMenuFix );	searchTimeMenu.add( searchTimeSubMenuAv );	// Add the search time menu to the main engine menu.	engineMenu.add( searchTimeMenu);	// Add a menu for the hashtable size.	JMenu hashtableSizeMenu = new JMenu( "Hashtable size");	// Add various options for the hashtable size.	this.buttonGroupHashSize = new ButtonGroup();	_hashtableSizeMenuItem = new JRadioButtonMenuItem[ _hashtableSizes.length];	for( int hts = 0; hts < _hashtableSizes.length; hts++) {	    _hashtableSizeMenuItem[ hts ] = new JRadioButtonMenuItem( "" + _hashtableSizes[ hts ] + " entries");	    _hashtableSizeMenuItem[ hts ].addActionListener( this);	    if ( _hashtableSizes[ hts ] == 10000 )		{		    _hashtableSizeMenuItem[ hts ].setSelected( true );		    getHashtable().setMaximumSize( _hashtableSizes[ hts ]);		}	    // Add the current search time menu item to it's menu.	    hashtableSizeMenu.add( _hashtableSizeMenuItem[hts]);	    this.buttonGroupHashSize.add( _hashtableSizeMenuItem[ hts ] );	}	// Add the search time menu to the main engine menu.	engineMenu.add( hashtableSizeMenu);	// Add a menu item to read openings from PGN files.	engineMenu.addSeparator();	engineMenu.add( new LoadOpeningsAction( getOpeningBook()));	// Return the engine menu.	return engineMenu;    }    /**     * Perform a action (could be a menu related action).     *     * @param actionEvent The event.     */    public final void actionPerformed(ActionEvent actionEvent)    {				// Check, if the user (de-)activated the permanent brain.	if( actionEvent.getSource().equals( _permanentBrainMenuItem)) {	    activatePermanentBrain( _permanentBrainMenuItem.isSelected());	    this.notifyListeners();	    return;	}				// Check if the user has requested a new search time	for( int st = 0; st < _searchTime.length; st++)	    {		if( actionEvent.getSource().equals( _avSearchTimeMenuItem[ st])) {		    setMaximumSearchTime( _searchTime[ st] * 1000);		    this.bFixedTime = false;		}		if( actionEvent.getSource().equals( _fixSearchTimeMenuItem[ st ])) {		    setMaximumSearchTime( _searchTime[ st ] * 1000);		    this.bFixedTime = true;		}	    }				// Check, if the user has requested a different hashtable size.	for( int hts = 0; hts < _hashtableSizes.length; hts++)	    {		if( actionEvent.getSource().equals( _hashtableSizeMenuItem[ hts]))		    {			getHashtable().setMaximumSize( _hashtableSizes[ hts ]);		    }	    }	this.notifyListeners();    }    /**     * Sets the EnginePanel to be able to output in the panel and not only with     * System.out.println(...)     *     * @param panel The EnginePanel to set     */    public void setEnginePanel(EnginePanel panel) {	this._enginePanel = panel;    }    /**     * Get the current game state.     *     * @param white True, if the state of the white player is requested.     *     * @return The current game state.     */    public final byte getCurrentGameState( boolean white) {	// Test if the given player is in check.	boolean inCheck = _analyzer.isInCheck( (BitBoard)getBoard(), white);	// Test if the player has valid plies available.	// The following computation of the available plies is not really efficient,	// since they are done anyway (either to compute the next computer ply or to	// check if a user ply is valid). So maybe the plygenerator or the engine should	// cache the computed plies.	boolean validPliesAvailable = ( _plyGenerator.getPliesForColor( (BitBoard)getBoard(), white).length > 0);	if( inCheck) {	    return validPliesAvailable ? GameState.CHECK : GameState.CHECKMATE;	} else {	    return validPliesAvailable ? GameState.ONGOING : GameState.DRAW;	}    }    public void setStatusPanel(StatusPanel myPanel) {	if ( this._statusPanel != myPanel )	    this._statusPanel = myPanel;    }    /**     * Initially create a logfile     */    private void createLogFile()    {	File homedir = new File(System.getProperty("user.home"));	f = new File(homedir, LOG_FILENAME );	try{	    FileWriter fileWriter = new FileWriter(f);	    PrintWriter printWriter = new PrintWriter( fileWriter );	    printWriter.println( "## Java-Chess Engine Logfile, do not edit! ##" );	    printWriter.println( "## For internal use only! ##" );	    printWriter.close();	}	catch (IOException e) {}    }    /**     * Ads a log entry into the JavaChess logfile     *     * @param text The text to append     */    private void addLogEntry(String text)    {	if ( f != null )	    {		try{		    // First read the existing lines into vBuffer		    BufferedReader bfrIniFile = new BufferedReader( new FileReader( f ) );		    String strOrgLine = bfrIniFile.readLine();		    vBuffer = new Vector();		    String strLine;		    while( strOrgLine != null )			{			    strLine = strOrgLine.trim();			    this.vBuffer.addElement( strLine );			    strOrgLine = bfrIniFile.readLine();			}		    // now create file new but with same filename		    FileWriter fileWriter = new FileWriter(f);		    PrintWriter printWriter = new PrintWriter(fileWriter);		    // insert former existing text:		    String strWrite[] = new String[vBuffer.size()];		    vBuffer.copyInto( strWrite );		    for( int i=0; i < vBuffer.size(); i++ )			{			    printWriter.println( strWrite[i] );			}		    // add the new text now:		    printWriter.println( text );		    printWriter.close();		}		catch (Exception e) {}	    }    }    /**     * Returns whether the search time is fixed or not.     *     * @return Is the search time fixed?     */    public boolean isFixedTime() {	return ( this.bFixedTime );    }    /**     * Returns the hash size     *     * @return The hashsize     */    public int getHashSize() {	return ( this.getHashtable().getMaximumSize() );    }    /**     * Returns the status string to display in status bar     */    public String getStatusDisplayString()    {	String retString = "HashSize: " + this.getHashSize() + " entries; "	    + "Search time: " + this.getMaximumSearchTime()/1000 + "sec";	if ( this.isFixedTime() )	    {		retString += " fix";	    }	else{	    retString += " average";	}	return ( retString );    }    /**     * Registers an object for notification.     * @param listener The object to be registered.     */    public void addEngineStatusListener(EngineStatusListener listener) {	listeners.add(listener);    }    /**     * Notifies all registered listeners that the engine has taken a change.     */    public void notifyListeners()    {	Iterator iterator = listeners.iterator();	while (iterator.hasNext())	    {		EngineStatusListener listener = (EngineStatusListener)iterator.next();		listener.engineStatusChanged( this );	    }    }}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一二三级电影| 亚洲v中文字幕| 色噜噜夜夜夜综合网| 首页国产丝袜综合| 国产亚洲一二三区| 欧美亚洲一区二区在线| 激情六月婷婷久久| 亚洲青青青在线视频| 欧美一区二区女人| 成人a区在线观看| 日韩电影在线一区二区三区| 日韩一区在线播放| 日韩欧美精品三级| 99re视频这里只有精品| 精品亚洲国产成人av制服丝袜| 中文字幕在线一区二区三区| 91亚洲资源网| 国产在线日韩欧美| 亚洲gay无套男同| |精品福利一区二区三区| 日韩亚洲欧美中文三级| 精品综合免费视频观看| 视频一区在线播放| 亚洲激情校园春色| 国产精品嫩草影院com| 欧美丰满一区二区免费视频| 成人18精品视频| 捆绑紧缚一区二区三区视频| 亚洲精品亚洲人成人网| 国产日韩三级在线| 欧美大片在线观看| 欧美日韩国产综合一区二区| 成人av免费网站| 国产一区二区日韩精品| 视频在线观看国产精品| 亚洲一区二区四区蜜桃| 亚洲视频免费观看| 亚洲精品在线三区| 在线亚洲+欧美+日本专区| 日本亚洲电影天堂| 中文字幕在线一区二区三区| 精品剧情在线观看| 色狠狠av一区二区三区| 国产激情视频一区二区在线观看 | 91国产成人在线| 成人免费视频caoporn| 国产一区二区三区免费在线观看| 亚洲在线中文字幕| 国产精品久久久久久久久图文区| 久久免费精品国产久精品久久久久| 69成人精品免费视频| 99精品视频在线播放观看| 狠狠色丁香婷婷综合| 日韩主播视频在线| 视频在线在亚洲| 日本不卡一区二区| 日韩二区三区四区| 日本欧洲一区二区| 美女精品一区二区| 久久99国产精品久久99| 九九**精品视频免费播放| 久久se这里有精品| 国产成人综合精品三级| 成人一区二区三区中文字幕| 国产一区二区三区在线看麻豆| 国产一区二区中文字幕| 不卡欧美aaaaa| 色综合久久天天综合网| 欧美日韩国产高清一区二区三区 | 久久精品视频免费观看| 精品国产一二三区| 国产精品久久久久久久裸模| 日韩美女精品在线| 偷拍日韩校园综合在线| 久久精品国产99国产| 国产精品性做久久久久久| 99久久精品国产导航| 91成人在线免费观看| 精品区一区二区| 国产日韩欧美综合在线| 亚洲欧美韩国综合色| 天天av天天翘天天综合网| 麻豆91精品91久久久的内涵| 日本视频一区二区| 岛国一区二区三区| 国产成人亚洲综合a∨婷婷图片| 成人在线视频一区| av在线不卡网| 91精品国产一区二区三区香蕉| 精品人在线二区三区| 依依成人精品视频| 久久精品国产一区二区三区免费看 | 久久女同性恋中文字幕| 亚洲欧美视频在线观看视频| 午夜精品久久久久久久99水蜜桃 | 国产成人在线看| 欧美在线观看一二区| 日韩视频在线你懂得| 亚洲色图清纯唯美| 日韩vs国产vs欧美| 99热这里都是精品| 精品卡一卡二卡三卡四在线| 亚洲美女少妇撒尿| 国产一本一道久久香蕉| 91黄色小视频| 久久亚洲一区二区三区明星换脸| 自拍偷拍国产精品| 九一久久久久久| 欧美综合一区二区三区| 综合久久一区二区三区| 奇米精品一区二区三区四区 | 亚洲.国产.中文慕字在线| 蜜桃视频在线一区| 91搞黄在线观看| 蜜臀av性久久久久蜜臀aⅴ四虎 | 狠狠狠色丁香婷婷综合久久五月| 一本到不卡免费一区二区| 久久久精品免费网站| 日韩国产精品大片| 91久久精品网| 国产精品理伦片| 捆绑调教美女网站视频一区| 在线观看亚洲成人| 亚洲男人天堂av网| 国产**成人网毛片九色| 精品电影一区二区| 日韩不卡一二三区| 在线国产电影不卡| 有坂深雪av一区二区精品| 国产91精品欧美| 中文一区在线播放| 国产在线精品免费av| 2021国产精品久久精品| 丝袜诱惑亚洲看片| 欧美综合天天夜夜久久| 成人欧美一区二区三区1314| 日韩电影一区二区三区四区| 色综合久久中文字幕综合网| 久久久久久久综合色一本| 丝袜亚洲另类欧美综合| 欧美在线看片a免费观看| 综合色天天鬼久久鬼色| 9人人澡人人爽人人精品| 久久久不卡网国产精品二区| 精品亚洲成a人| 欧美成人艳星乳罩| 日本不卡一区二区三区| 欧美一区日本一区韩国一区| 亚洲第一会所有码转帖| 色老综合老女人久久久| 亚洲免费观看在线观看| 99久久亚洲一区二区三区青草| 亚洲精品一区二区三区香蕉| 久久精品噜噜噜成人av农村| 欧美日韩亚洲综合在线| 日韩高清电影一区| 欧美日韩高清影院| 亚洲精品日日夜夜| 色综合久久久久| 亚洲免费av网站| 一本一本久久a久久精品综合麻豆| 久久综合色婷婷| 午夜欧美大尺度福利影院在线看| 欧美专区日韩专区| 亚洲国产精品久久艾草纯爱| av一二三不卡影片| 亚洲在线中文字幕| 欧美电影在哪看比较好| 亚洲国产精品久久久男人的天堂| 97se狠狠狠综合亚洲狠狠| 一区二区三区美女| 777色狠狠一区二区三区| 不卡视频在线看| 亚洲免费观看视频| 91精品婷婷国产综合久久| 五月天一区二区三区| 日韩欧美色电影| 波多野结衣一区二区三区| 国产精品的网站| 欧洲一区在线电影| 久久疯狂做爰流白浆xx| 国产精品系列在线| 亚洲成人av一区二区| 亚洲色图制服丝袜| 亚洲精品国产第一综合99久久| 欧美一区二区在线不卡| 欧美日韩一区二区不卡| 国产91精品欧美| 国产成人精品影视| 日韩电影免费在线看| 蜜桃av噜噜一区二区三区小说| 一区二区三区中文字幕精品精品| 国产精品福利一区二区| 日韩精品一区二区三区视频 | 中文字幕视频一区二区三区久| 91日韩在线专区| 午夜久久久久久久久| 国产精品久久久久7777按摩 | 国产三级三级三级精品8ⅰ区| 成人久久18免费网站麻豆|