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

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

?? pieceslayer.java

?? chess 一個(gè)beguanyu國(guó)際象棋的一個(gè)Java源碼
?? JAVA
字號(hào):
/*	PiecesLayer - A component to hold the pieces of a chess game.	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.renderer2d;import de.java_chess.javaChess.*;import de.java_chess.javaChess.board.*;import de.java_chess.javaChess.piece.*;import de.java_chess.javaChess.ply.*;import de.java_chess.javaChess.position.*;import java.awt.*;import javax.swing.*;/** * This class implements the functionality to hold the pieces of a * chessboard. */class PiecesLayer extends JPanel {		// Instance variables		private Board _board;		private ChessSet _set;		/**		 * Flag to indicate of the moves are animated.		 */		private boolean _animatedMoves = false;		/**		 * The layer to animate the moved pieces.		 */		private AnimationLayer _animationLayer;		/**		 * The labels for all the squares.		 */		private PositionRenderer [] _square = new PositionRenderer[64];		PiecesLayer( Board board) {	super( new GridLayout(8,8));	_set = new ChessSet(this);	_animationLayer = new AnimationLayer( this);				_board = board;				int _boardSize = 8 * ChessBoardRenderer2D.getSquareSize();	setPreferredSize( new Dimension( _boardSize, _boardSize));	setBounds( 0, 0 , _boardSize, _boardSize);	setOpaque(false);	repaintBoard();		}		final void repaintBoard() {	// removeAll();	// Create a renderer for each chessboard square	Position pos = new PositionImpl( 0);  // Avoid to create new position instances for each square	for( int s = 0; s < 64; s++) {			pos.setSquareIndex( s);			Piece p = _board.getPiece( pos);			_square[ s] = ( p != null ? new PositionRenderer( new PieceRenderer( p.getColor(), p.getType(), _set, this)) : new PositionRenderer());	}	// Remove all the squares, in case this is a reset and the pieces layer already contains the	// squares of an existing board.	removeAll();	// The order of the component adding is different then the order of the chessboard squares.	// _square[0] = square a1 of the chessboard, but the components are added from the left	// upper square (= a8)				for( int s = 63; s >= 0; s--) {			add( _square[ ( s & ~7) + ( 7 - ( s & 7))]);	}	repaint();		}		/**		 * Render a ply.		 *		 * @param ply The ply to render.		 */		public final void doPly( Ply ply) {	if( _animatedMoves) {			getAnimationLayer().animatePly( ply);			getAnimationLayer().start();			repaint();	} else {			// Check, if it was a castling			if( ply instanceof CastlingPly) {		int source = ply.getSource().getSquareIndex();		if( ( (CastlingPly)ply).isLeftCastling()) {				_square[ source - 2].getPieceFrom( _square[ source]);				_square[ source - 1].getPieceFrom( _square[ source - 4]);  // Move the rook to the right		} else {				_square[ source + 2].getPieceFrom( _square[ source]);				_square[ source + 1].getPieceFrom( _square[ source + 3]);  // Move the rook to the left		}			} else {		// If a pawn has just reached the last row		if(ply instanceof TransformationPly) {				// Copy the piece from source square to destination square.				_square[ ply.getDestination().getSquareIndex()].getPieceFrom( _square[ ply.getSource().getSquareIndex()]);				// Now change the rendering to the new piece type.				_square[ ply.getDestination().getSquareIndex()].setIcon( new ImageIcon( new PieceRenderer( ply.getDestination().getSquareIndex() < 8												? Piece.BLACK : Piece.WHITE, ( (TransformationPly)ply).getTypeAfterTransformation(), _set, this)));		} else {				// Copy the piece from source square to destination square.				_square[ ply.getDestination().getSquareIndex()].getPieceFrom( _square[ ply.getSource().getSquareIndex()]);				// If it's a en passant ply, remove the attacked pawn.				if( ply instanceof EnPassantPly) {			_square[ ( (EnPassantPly)ply).getAttackedPosition().getSquareIndex()].setIcon( null);				}		}			}			repaint();	}		}		/**		 * Get the current animation layer.		 *		 * @return The current animation layer.		 */		final AnimationLayer getAnimationLayer() {	return _animationLayer;		}		/**		 * Get the position renderer for a given square.		 *		 * @param squareIndex The index of the square.		 *		 * @return The position renderer for the given square.		 */		final PositionRenderer getPositionRenderer( int squareIndex) {	return _square[ squareIndex];		}		final void clearBoard()		{			// Create a renderer for each chessboard square			Position pos = new PositionImpl( 0);  // Avoid to create new position instances for each square			for( int s = 0; s < 64; s++)			{				pos.setSquareIndex( s);				_square[ s ] = new PositionRenderer();			}			// Remove all the squares, in case this is a reset and the pieces layer already contains the			// squares of an existing board.			removeAll();			// The order of the component adding is different then the order of the chessboard squares.			// _square[0] = square a1 of the chessboard, but the components are added from the left			// upper square (= a8)			for( int s = 63; s >= 0; s--)			{				add( _square[ ( s & ~7) + ( 7 - ( s & 7))]);			}			repaint();		}}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
麻豆91在线观看| 天堂成人免费av电影一区| 成人免费视频视频在线观看免费| 精品国产免费人成电影在线观看四季 | 国产精品国产精品国产专区不片 | 天堂va蜜桃一区二区三区漫画版| 欧美伊人久久大香线蕉综合69 | 亚洲国产综合视频在线观看| 欧美日韩视频专区在线播放| 久热成人在线视频| 日本一区二区三区dvd视频在线| 成人av电影观看| 亚洲成av人片观看| 久久蜜桃av一区二区天堂| av男人天堂一区| 日韩专区在线视频| 久久精品一区二区三区四区| 色婷婷综合久久| 喷白浆一区二区| 中文字幕精品综合| 91精品国产综合久久福利| 国产jizzjizz一区二区| 亚洲综合成人在线视频| 欧美videos中文字幕| av电影在线观看完整版一区二区| 午夜视频在线观看一区二区| 久久久精品免费观看| 欧美人狂配大交3d怪物一区 | av福利精品导航| 免费在线观看成人| 中文字幕一区二区在线观看| 91精品国产色综合久久久蜜香臀| 国产成人免费高清| 五月婷婷欧美视频| 18欧美亚洲精品| 精品日韩欧美在线| 欧美亚洲精品一区| 波波电影院一区二区三区| 老司机一区二区| 亚洲永久精品大片| 国产精品久久久久四虎| 日韩精品一区二区三区视频播放 | 成人黄色电影在线| 视频在线观看一区二区三区| 国产精品成人免费精品自在线观看| 在线观看91av| 欧美中文一区二区三区| 99久久免费精品| 国产精品性做久久久久久| 日本不卡不码高清免费观看| 一区二区在线免费| 国产精品丝袜久久久久久app| 日韩欧美一二三| 欧美日韩成人一区二区| 91国偷自产一区二区三区成为亚洲经典| 激情综合色综合久久| 日本怡春院一区二区| 亚洲精品日韩一| 亚洲欧美电影院| 1024国产精品| 国产精品盗摄一区二区三区| 国产女人水真多18毛片18精品视频| 欧美一区二区三区喷汁尤物| 制服丝袜在线91| 欧美理论电影在线| 欧美喷潮久久久xxxxx| 欧美伊人久久大香线蕉综合69 | 午夜不卡av在线| 亚洲成人av一区二区三区| 亚洲自拍偷拍综合| 亚洲综合丝袜美腿| 午夜欧美视频在线观看| 性做久久久久久免费观看欧美| 亚洲一区二区成人在线观看| 亚洲在线中文字幕| 亚洲国产精品久久人人爱蜜臀| 一区二区三区在线高清| 亚洲影院理伦片| 日韩精品1区2区3区| 免费成人性网站| 韩国理伦片一区二区三区在线播放 | 91高清在线观看| 欧美日韩美女一区二区| 8x福利精品第一导航| 欧美一区二区在线播放| 欧美成人在线直播| 欧美激情一区二区三区四区| 国产精品麻豆久久久| 尤物视频一区二区| 日韩成人dvd| 国产福利不卡视频| 99国产精品久久久久久久久久| 91麻豆精品秘密| 欧美日本精品一区二区三区| 日韩精品中文字幕在线不卡尤物| 久久免费电影网| 国产精品国产三级国产aⅴ无密码| 亚洲卡通动漫在线| 爽好久久久欧美精品| 国产一区二区三区香蕉| 风间由美一区二区av101| 色一情一乱一乱一91av| 欧美日韩一区在线观看| 精品区一区二区| 一色屋精品亚洲香蕉网站| 亚洲高清一区二区三区| 久久精品99久久久| 97久久人人超碰| 日韩一二在线观看| 国产精品伦理在线| 日韩激情av在线| 成人美女视频在线观看18| 欧美色精品在线视频| wwww国产精品欧美| 亚洲激情综合网| 国产综合色在线| 91久久精品一区二区| 欧美精品一区二| 一级女性全黄久久生活片免费| 蜜桃91丨九色丨蝌蚪91桃色| 99re6这里只有精品视频在线观看| 欧美精品在线观看播放| 亚洲欧美在线另类| 黄色成人免费在线| 欧美日产在线观看| 国产精品久久福利| 美女网站在线免费欧美精品| 91首页免费视频| 久久久久久久一区| 日本不卡一区二区三区高清视频| 99re免费视频精品全部| 欧美xxxxx牲另类人与| 亚洲国产乱码最新视频| www.激情成人| 国产视频一区在线播放| 美女被吸乳得到大胸91| 欧美专区日韩专区| 国产精品久久久久久久蜜臀| 国产在线视频不卡二| 欧美一区二区在线播放| 亚洲高清在线精品| 91福利区一区二区三区| 一区二区中文字幕在线| 国产精品一线二线三线精华| 日韩一区国产二区欧美三区| 亚洲自拍欧美精品| 94色蜜桃网一区二区三区| 国产欧美中文在线| 国产一区激情在线| 欧美不卡激情三级在线观看| 日韩电影网1区2区| 欧美日韩亚洲综合一区二区三区| 亚洲精品乱码久久久久久| 91最新地址在线播放| 日韩一区日韩二区| 91在线视频免费91| 综合久久久久久久| 91麻豆.com| 国产精品久久久久久亚洲伦| 成人sese在线| 中文字幕在线不卡一区| 成人精品小蝌蚪| 国产女人aaa级久久久级| 国产69精品久久久久毛片| 日本一区二区免费在线| 懂色av一区二区夜夜嗨| 中文字幕第一区综合| 不卡av电影在线播放| 国产精品视频免费| 99久久综合99久久综合网站| 亚洲男人的天堂av| 在线日韩av片| 日日摸夜夜添夜夜添精品视频| 欧美猛男gaygay网站| 蜜桃免费网站一区二区三区| 精品国产不卡一区二区三区| 国产精品一区在线| 综合激情成人伊人| 欧美色图12p| 日本在线播放一区二区三区| 日韩女同互慰一区二区| 欧美男生操女生| 国产日韩欧美高清在线| 国产高清在线观看免费不卡| 久久精品人人爽人人爽| av亚洲精华国产精华| 亚洲影视在线播放| 7777精品伊人久久久大香线蕉完整版 | 91豆麻精品91久久久久久| 图片区小说区区亚洲影院| 日韩欧美国产精品一区| 国产大陆亚洲精品国产| 一区二区理论电影在线观看| 日韩一区二区在线看| 国产成人在线免费| 亚洲国产日韩一区二区| 久久免费美女视频| 日本电影欧美片| 麻豆高清免费国产一区| 18成人在线观看|