資源簡介
內附eclipse項目,可運行jar包,和課程設計報告,覺得讓你一下子看懂

代碼片段和文件信息
package?Chiness;
import?java.applet.*;
import?java.awt.Color;
import?java.awt.event.*;
import?java.io.*;
import?java.net.*;
import?java.util.Vector;
import?javax.swing.*;
public?class?Chessboard?extends?JPanel?implements?MouseListener?{
private?static?final?long?serialVersionUID?=?6088177003307557858L;
final?String[]?WhoStr?=?{?“紅方“?“黑方“?};
final?String[]?MusicStr?=?{?“開“?“關“?};
final?String?PATH?=?“./res/棋子.dat“;
final?String?FlagPATH?=?“./res/運行參數(shù).dat“;
final?String?IPPATH?=?“./res/IP.dat“;
final?int[]?TimeInt?=?{?10?30?60?};
final?int?TOP?=?57;//?上邊距
final?int?BELOW?=?589;//?下邊距
final?int?RIGHT?=?470;//?右邊距
final?int?LEFT?=?32;//?左邊距
final?int?HGAP?=?55;//?橫間距
final?int?VGAP?=?59;//?縱間距
final?int?SIZE?=?45;//?大小
static?int?TIME?=?30;//?初始設置計時時間
static?float?TimeKeeping;//?計時
static?int?Count?=?1;//?點擊次數(shù)
static?int?Order?=?1;//?紅方開始標志黑方為0
static?int?Blackcount?=?0;//?黑方超時次數(shù)
static?int?Redcount?=?0;//?紅方超時次數(shù)
ImageIcon?bug;
AudioClip?audio;
Thread?chessThread?timeThread?client;
Chessflicks?flicker?=?new?Chessflicks();
Timectrl?control?=?new?Timectrl();
@SuppressWarnings(“rawtypes“)
Vector?Backvector?=?new?Vector();
SerializablePoint[]?SP?=?new?SerializablePoint[33];
Point[]?point?=?new?Point[33];
File?PointFile?=?new?File(PATH);
File?FlagFile?=?new?File(FlagPATH);
File?IPFile?=?new?File(IPPATH);
ChessRule?rule?=?new?ChessRule();
ActionHandler?handler?=?new?ActionHandler();
JLabel?TimeMessage?TopMessage?MidMessage;
JButton?BackButton?GiveupButton?SuspendButton?ConnectButton
CancelButton;
JPopupMenu?popupMenu;
JMenu?Time?Who?Music;
ButtonGroup?TimeGroup?WhoGroup?MusicGroup;
JRadioButtonMenuItem?Timeitem[]?Whoitem[]?Musicitem[];
JMenuItem?helpItem;
int?clientID?=?-1;
Socket?connection;
DataInputStream?input;
DataOutputStream?output;
boolean?GameOver?=?false;//?游戲結婚標志
boolean?Start?=?true;//?游戲開始標志
boolean?TimeOut?=?false;//?暫停
boolean?isClick?=?false;//?是否點擊棋子標志
boolean?MUSIC?=?true;//?音樂播放標志
boolean?ChangeTime?=?true;//?游戲開始時設置計時標志
boolean?ThreadStart?=?false;//?線程空運行標志
boolean?CONTINUE?=?false;//?序列化代用
boolean?Connection?=?false;//?;連接
int?Iindex?Secondindex?=?-1?Xindex?Yindex;
String?communication?=?““;
public?Chessboard()?{
setLayout(null);
TimeMessage?=?new?JLabel(“剩余時間:“?+?TIME);
TimeMessage.setBounds(RIGHT?-?2?*?HGAP?-?10?TOP?-?30?88?30);
add(TimeMessage);
MidMessage=new?JLabel();
MidMessage.setBounds((RIGHT?-?LEFT)?/?2?-?12?+?LEFT?TOP-30?90
30);
add(MidMessage);
TopMessage?=?new?JLabel(WhoStr[0]?+?“下棋“);
TopMessage.setBounds(LEFT?+?2?*?HGAP?TOP?-?30?80?30);
add(TopMessage);
BackButton?=?new?JButton(“悔棋“);
BackButton.setToolTipText(“退回上一步“);
BackButton.setBounds(LEFT?+?2?*?HGAP?-?5?BELOW?+?48?60?30);
BackButton.addActionListener(handler);
add(BackButton);
BackButton.setEnabled(false);
SuspendBu
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
????.......?????36263??2012-06-19?12:51??P17-象棋java課程設計\象棋服務器.jar
????.......?????36263??2012-06-19?12:51??P17-象棋java課程設計\象棋.jar
????.......?????84382??2013-05-29?23:15??P17-象棋java課程設計\res\background.jpg
????.......?????80044??2013-06-06?23:02??P17-象棋java課程設計\res\begin.wav
????.......??????9097??2013-05-29?22:31??P17-象棋java課程設計\res\bin.png
????.......??????9092??2013-05-29?22:28??P17-象棋java課程設計\res\bin1.png
????.......??????9154??2013-05-29?22:29??P17-象棋java課程設計\res\che.png
????.......??????9164??2013-05-29?22:29??P17-象棋java課程設計\res\che1.png
????.......?????43402??2013-06-06?22:34??P17-象棋java課程設計\res\dead.wav
????.......?????16992??2013-06-06?22:34??P17-象棋java課程設計\res\eat.wav
????.......?????12632??2013-06-06?22:34??P17-象棋java課程設計\res\gameover.wav
????.......?????54958??2013-06-06?22:34??P17-象棋java課程設計\res\gamewin.wav
????.......??????3362??2013-06-06?22:34??P17-象棋java課程設計\res\go.wav
????.......??????9185??2013-05-29?22:29??P17-象棋java課程設計\res\ma.png
????.......??????9176??2013-05-29?22:28??P17-象棋java課程設計\res\ma1.png
????.......??????9234??2013-05-29?22:29??P17-象棋java課程設計\res\pao.png
????.......??????9138??2013-05-29?22:29??P17-象棋java課程設計\res\pao1.png
????.......?????15590??2013-06-06?22:34??P17-象棋java課程設計\res\select.wav
????.......??????9130??2013-05-29?22:29??P17-象棋java課程設計\res\shi.png
????.......??????9125??2013-05-29?22:29??P17-象棋java課程設計\res\shi1.png
????.......??????9237??2013-05-29?22:28??P17-象棋java課程設計\res\shuai.png
????.......??????9008??2013-05-29?22:28??P17-象棋java課程設計\res\shuai1.png
????.......??????9125??2013-05-29?22:31??P17-象棋java課程設計\res\xiang.png
????.......??????9117??2013-05-29?22:31??P17-象棋java課程設計\res\xiang1.png
????.......?????12690??2013-06-06?16:38??P17-象棋java課程設計\res\xxx.jpg
?????文件?????????15??2013-07-24?21:19??P17-象棋java課程設計\res\serverIP.dat
????.......???????301??2013-06-07?16:20??P17-象棋java課程設計\源代碼\Chiness\.classpath
????.......???????383??2013-06-07?16:20??P17-象棋java課程設計\源代碼\Chiness\.project
????.......???????598??2013-06-07?16:20??P17-象棋java課程設計\源代碼\Chiness\.settings\org.eclipse.jdt.core.prefs
????.......??????2815??2012-06-19?12:49??P17-象棋java課程設計\源代碼\Chiness\bin\Chiness\Server$ServerThread.class
............此處省略59個文件信息
評論
共有 條評論