Code Download Address: HTTPS://CODE.CSDN.NET/FANSUNION/CHINESECHESS-V1
/**
* Project Name: fanschinesechess
* Version Number: 1.0
* Name: Raven
* Blog: http://FansUnion.cn
* Csdn:http://blog.csdn.net/fansunion
* Email: leiwen@FansUnion.cn
* qq:240-370-818
* All rights reserved: 2011-2013,leiwen
*/
Last Updated: 2010-11-12 (end of code development)
This update: 2013-9-9 (add documentation and comments)
Introduction to the main classes
Logindialog: Login dialog box, you need to enter a username and server address (localhost)
Chessserver: Server
Chessclient: Client interface, after successful login, jump to the interface
Cn.fansunion.core
Chessboard: Chessboard
Chesspiece: Chess Pieces
Chesspoint: Pawn Points
Gamerule: The rules of the game
MoveRecord: All information for a moving record
Movestep: Location information for the start and end of a moving record
Cn.fansunion.ui
Demo: Demo History Game Interface
Makechessmanual: Pawn Move record panel
Cn.fansunion.util
Chessutils: Tool Class
Constants: Constants
Datapacket:2 data packets for client communications
Handleasession: Defines a thread class for 2 players to handle a new session
Message: Chat Information
ThreadPool: Thread pool
In 2010, I downloaded 1 Chinese chess programs from the CSDN Download Center, which is quite simple.
On this basis, I developed the current version (1.0) of the program. Relative to the downloaded version,
Increased networking, undo and other functions, add the necessary annotations, rename classes, functions, variable names, improve readability.
How to run the game:
1. Run the Chessserver server.
2. Run Logindialog, enter user name and server address of Player 1 (this machine is localhost) such as Leiwen,localhost
3. Run Logindialog, enter user name and server address of Player 2 (this machine is localhost) such as Fansunion,localhost
2 players cannot have the same user name.
4.2 Players are automatically bound to 1 sessions after they log in.
1 for Red, 1 for blue.
Blue First "Prepare the game", Red Party then "start the game".
Special Note: This 1.0 version of the function is relatively weak, the user experience is also very poor, there are many bugs.
Mainly used for learning, if interested, can be perfected by themselves.
2.0 version is much better than the 1.0 version, whether it is the function or user experience, the recent update, please look forward to.
Lei fansunion-learned Internet technical worker
November 18, 2014
Hubei Wuhan Methodist Gate
Code Download Address: HTTPS://CODE.CSDN.NET/FANSUNION/CHINESECHESS-V1