问题在此

小女子上次发过一个帖子了,经过2周的挣扎,还是NO IDEA AT ALL,老师坚持不肯给我提示。所以请问大家有没有代码可以参考,或者给我一点提示,谢谢大家的帮忙。

2. Task
At the design stage you should consider carefully the structure of your program. Your design must include a class
called Board, which represents the chess board, a class called Player to represent each player (hint: use inheritance
for the different kinds of player), and a class called Piece to represent each chess piece (hint: use inheritance for the
different pieces e.g. Pawn, King).
2.1 Stage 1 (maximum mark of 80%)
Your program should perform the following:
1. There can be three types of player.
•Computer player that makes random moves.
•Computer player that makes aggressive moves. This player will try to take a piece if possible, and move
randomly otherwise.
•Human player who makes moves using the mouse.
2. On starting, the program should allow the user to select which of the three types of player will move the black
pieces and which type of player the white pieces. (This could be done interactively in answer to questions or
could be read from a text file that is supplied when the program is run.)
3. The program should display a graphical window showing the current state of the board. This window should be
updated after each move.
4. Each piece can only make legal moves.
5. You do not have to implement castling, en passant, promotion and check.
6. The game should continue until the king is taken. At this point the player who takes the king is the winner.
2.2 Stage 2 (Stage 1 + Stage 2 gives a maximum mark of 100%)
7. You should implement the additional features of castling, en passant, promotion and check – additional marks
are available for implementing these.
8. If you have implemented check, then the game should continue until the king is in checkmate.
9. An additional type of player is required:
•Computer player that likes check – This player will try to check the opponent if possible, and move
randomly otherwise.

所有跟帖: 

回复:问题在此 -这是考试吗- 给 这是考试吗 发送悄悄话 (307 bytes) () 10/30/2004 postreply 17:31:22

图形搜索算法和递归是肯定要用到的 -还有一个- 给 还有一个 发送悄悄话 (0 bytes) () 10/30/2004 postreply 17:36:43

很多号称4-5年Java经验的都写不出这东西 -DLinky- 给 DLinky 发送悄悄话 (9 bytes) () 10/30/2004 postreply 21:38:01

请您先登陆,再发跟帖!