Chessboard.java
The class generated by the file is responsible for creating the "chess board", the user can use the mouse to drag the chess piece on the board, when releasing the mouse is to put pieces of chess points. The board does not allow the user to drag and drop a piece onto a non-point. The rule object on the chessboard is responsible for judging whether moves has complied with Chinese chess rules, such as "horse" Walking Day, "Elephant" walking field, "pawn" to go not back and so on. If the user's walk does not conform to the rules, the pieces will be put back in place, and walk again. The makechessmanual object of the chessboard is responsible for recording the game, and when the user chooses the "Save Game" menu item, the current game can be saved as a file. In addition, the board can be undo, undo will not be recorded to the game.
Chesspoint.java
The class generated by the file is responsible for creating a chess point object. The chess point object can judge whether there is a pawn on the point, specify the chess piece on the current point, get the chess piece on the current point, and move the chess piece on the current point.
Chesspiece.java
The class generated by the file is responsible for creating the pawn object. and draw the appearance of the pieces. A pawn object can get its own color, size, name, and can also set and get its own category, namely Red Chess and black chess.
Makechessmanual,java
The class generated by the file is responsible for creating the object that records the game, which can record the game into a linked table and display the game in a text area. When the undo, the object will modify the game and update the text area information.
Ruler.java
The class generated by the file is responsible for creating the "moves Rule" object, which is responsible for whether the user's user's walk conforms to the rules.
Demon.java
The class generated by the file is responsible for creating a "game Demo" object that can demonstrate the saved game.
Movestep.java
The object created by the class records a chess step.
Design class Diagram