资源简介
很简单的一个程序 实现了国际象棋的大部分功能

代码片段和文件信息
/*
GameController - A class to control the game of chess.
Copyright (C) 2003 The Java-Chess team
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;
import de.java_chess.javaChess.board.*;
import de.java_chess.javaChess.dialogs.*;
import de.java_chess.javaChess.engine.*;
import de.java_chess.javaChess.game.*;
import de.java_chess.javaChess.notation.*;
import de.java_chess.javaChess.piece.*;
import de.java_chess.javaChess.ply.*;
import de.java_chess.javaChess.position.*;
import de.java_chess.javaChess.renderer.ChessBoardRenderer;
import de.java_chess.javaChess.timer.*;
import javax.swing.*;
/**
* This class controls the game.
*/
public class GameController {
// Instance variables
/**
* The current game.
*/
private Game _game;
/**
* The game notation.
*/
private GameNotation _gameNotation;
/**
* A flag to indicate if white has the next move.
*/
private boolean _moveRight = true;
/**
* A flag to indicate if the computer play with white pieces.
*/
private boolean _computerIsWhite = false;
/**
* The chess engine.
*/
private ChessEngine _engine;
/**
* The current board.
*/
private Board _board;
/**
* The renderer.
*/
ChessBoardRenderer _renderer;
/**
* The timer for the game.
*/
GameTimer _gameTimer;
/**
* The current game state.
*/
byte _gameState;
// Constructors
/**
* Create a new controller instance.
*
* @param game The current game.
* @param gameNotation The notation of the game.
* @param engine The current engine.
* @param board The current board.
* @param timer The game timer.
*/
public GameController( Game game GameNotation gameNotation ChessEngine engine Board board GameTimer timer) {
setGame( game);
setGameNotation( gameNotation);
setEngine( engine);
setBoard( board);
setGameTimer( timer);
}
// Methods
/**
* 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;
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 92197 2003-02-24 09:36 一个java做的国际象棋小游戏\build\javaChess.jar
..AD... 0 2005-07-28 17:30 一个java做的国际象棋小游戏\build
文件 5426 2003-02-24 09:36 一个java做的国际象棋小游戏\docs\javadoc\allclasses-fr
文件 10592 2003-02-24 09:36 一个java做的国际象棋小游戏\docs\javadoc\de\java_chess\javaChess\action\JavaChessAction.html
文件 992 2003-02-24 09:36 一个java做的国际象棋小游戏\docs\javadoc\de\java_chess\javaChess\action\package-fr
文件 5118 2003-02-24 09:36 一个java做的国际象棋小游戏\docs\javadoc\de\java_chess\javaChess\action\package-summary.html
文件 5152 2003-02-24 09:36 一个java做的国际象棋小游戏\docs\javadoc\de\java_chess\javaChess\action\package-tree.html
文件 11963 2003-02-24 09:36 一个java做的国际象棋小游戏\docs\javadoc\de\java_chess\javaChess\action\SaveGameAction.html
文件 11916 2003-02-24 09:36 一个java做的国际象棋小游戏\docs\javadoc\de\java_chess\javaChess\action\SaveGameAsAction.html
..AD... 0 2003-02-24 09:36 一个java做的国际象棋小游戏\docs\javadoc\de\java_chess\javaChess\action
文件 25049 2003-02-24 09:36 一个java做的国际象棋小游戏\docs\javadoc\de\java_chess\javaChess\bitboard\BitBoard.html
文件 20447 2003-02-24 09:36 一个java做的国际象棋小游戏\docs\javadoc\de\java_chess\javaChess\bitboard\BitBoardImpl.html
文件 1081 2003-02-24 09:36 一个java做的国际象棋小游戏\docs\javadoc\de\java_chess\javaChess\bitboard\package-fr
文件 5186 2003-02-24 09:36 一个java做的国际象棋小游戏\docs\javadoc\de\java_chess\javaChess\bitboard\package-summary.html
文件 5219 2003-02-24 09:36 一个java做的国际象棋小游戏\docs\javadoc\de\java_chess\javaChess\bitboard\package-tree.html
..AD... 0 2003-02-24 09:36 一个java做的国际象棋小游戏\docs\javadoc\de\java_chess\javaChess\bitboard
文件 11366 2003-02-24 09:36 一个java做的国际象棋小游戏\docs\javadoc\de\java_chess\javaChess\board\Board.html
文件 827 2003-02-24 09:36 一个java做的国际象棋小游戏\docs\javadoc\de\java_chess\javaChess\board\package-fr
文件 4746 2003-02-24 09:36 一个java做的国际象棋小游戏\docs\javadoc\de\java_chess\javaChess\board\package-summary.html
文件 4688 2003-02-24 09:36 一个java做的国际象棋小游戏\docs\javadoc\de\java_chess\javaChess\board\package-tree.html
..AD... 0 2003-02-24 09:36 一个java做的国际象棋小游戏\docs\javadoc\de\java_chess\javaChess\board
文件 13527 2003-02-24 09:36 一个java做的国际象棋小游戏\docs\javadoc\de\java_chess\javaChess\engine\BitBoardAnalyzer.html
文件 16649 2003-02-24 09:36 一个java做的国际象棋小游戏\docs\javadoc\de\java_chess\javaChess\engine\BitBoardAnalyzerImpl.html
文件 8465 2003-02-24 09:36 一个java做的国际象棋小游戏\docs\javadoc\de\java_chess\javaChess\engine\BitUtils.html
文件 12851 2003-02-24 09:36 一个java做的国际象棋小游戏\docs\javadoc\de\java_chess\javaChess\engine\ChessEngine.html
文件 23202 2003-02-24 09:36 一个java做的国际象棋小游戏\docs\javadoc\de\java_chess\javaChess\engine\ChessEngineImpl.html
文件 967 2003-02-24 09:36 一个java做的国际象棋小游戏\docs\javadoc\de\java_chess\javaChess\engine\hashtable\package-fr
文件 5071 2003-02-24 09:36 一个java做的国际象棋小游戏\docs\javadoc\de\java_chess\javaChess\engine\hashtable\package-summary.html
文件 4931 2003-02-24 09:36 一个java做的国际象棋小游戏\docs\javadoc\de\java_chess\javaChess\engine\hashtable\package-tree.html
文件 9719 2003-02-24 09:36 一个java做的国际象棋小游戏\docs\javadoc\de\java_chess\javaChess\engine\hashtable\PlyHashtable.html
............此处省略218个文件信息
- 上一篇:Android 开发环境
- 下一篇:Java-WebSocket完整代码包
相关资源
- 个人根据Android移动开发案例详解手写
- [免费]java实现有障碍物的贪吃蛇游戏
- java编写21点游戏(附源代码)
- Android手机连连看游戏源码
- 俄罗斯方块具体设计(Java描述)带详
- JAVA坦克大战游戏源代码
- 用Java编写的扫雷游戏源代码
- 破碎的像素地牢-游戏源码
- 森林冰火人单人版(源码)
- wap魔界图文游戏
- 50个java小游戏源代码
- Java Swing开发的《星际争霸》游戏
- 动物交换游戏java代码及注释
- Java控制台实现猜拳游戏小游戏
- java经典游戏和经典含源码必须得收藏
- java炸弹人游戏
- Android游戏源码基于蓝牙的坦克大战和
- 用java开发的扑克牌游戏程序源代码
- 使用纯JAVA绘图带声音的经典坦克大战
- JAVA潜艇大战小游戏源码
- JAVA 炸弹人
- JAVA开发的中国象棋游戏包括源码和需
- java全屏游戏及源代码
- java 潜艇游戏
- 24点游戏Java实现
- java编写的泡泡堂炸弹人单机双人源码
- 基于Android的炸弹人游戏毕业设计
- 基于java的坦克大战游戏234736
- java实现的水果忍者游戏
- java课程设计游戏:急速飞行[绝不坑爹
评论
共有 条评论