-
大小: 460KB文件類型: .zip金幣: 2下載: 0 次發(fā)布日期: 2021-06-08
- 語言: Java
- 標(biāo)簽: java??國際象棋??網(wǎng)絡(luò)對戰(zhàn)??
資源簡介
一個可以進行網(wǎng)絡(luò)對戰(zhàn)的國際象棋源碼。這個程序可以換棋子和棋盤,還有聊天、以applet運行等功能,非常不錯??!一、用ant編譯源碼(所有源文件及目錄結(jié)構(gòu)請下載)C:\cs>ant compileBuildfile: build.xmlcompile:[mkdir] Created dir: C:\cs\build[javac] Compiling 60 source files to C:\cs\build[javac] Note: * uses or overrides a deprecated API.[javac] Note: Recompile with -Xlint:deprecation for details.[javac] Note: Some input files use unchecked or unsafe operations.[javac] Note: Recompile with -Xlint:unchecked for details.BUILD SUCCESSFULTotal time: 14 seconds 二、在命令行啟動服務(wù)端C:\cs>java com.borland.samples.chess.server.ChessServer05-12-28 下午09時44分43秒 CSTRead 2 userId records from C:\cs\users.objHello 8889Address of the Server :microsof-0f0cfb/127.0.0.1HelloThread: Waiting for someone to talk to me on port 8889三、打開兩個dos窗口,在命令行分別啟動兩個客戶端程序,每一個客戶端程序都會彈出登錄對話框,請輸入你的姓名和口令登錄。如其中之一C:\cs>java com.borland.samples.chess.client.ChessViewerimageName = images/cmpieces.gifimageName = images/owlpieces.gifimageName = images/ibmpieces.gifno file specifiedImageFactory.square size = 49 pieces=23671010CV8889Received: 8890ClientSender:Name with 2 parametersClientSender:List with 0 parametersClientSender:AdjuornedList with 0 parameters

代碼片段和文件信息
/**
?*?Copyright?(c)?1996-2004?Borland?Software?Corporation.??All?Rights?Reserved.
?*?
?*?This?SOURCE?CODE?FILE?which?has?been?provided?by?Borland?Software?as?part
?*?of?a?Borland?Software?product?for?use?ONLY?by?licensed?users?of?the?product
?*?includes?CONFIDENTIAL?and?PROPRIETARY?information?of?Borland?Software.??
?*
?*?USE?OF?THIS?SOFTWARE?IS?GOVERNED?BY?THE?TERMS?AND?CONDITIONS?
?*?OF?THE?LICENSE?STATEMENT?AND?LIMITED?WARRANTY?FURNISHED?WITH
?*?THE?PRODUCT.
?*
?*?IN?PARTICULAR?YOU?WILL?INDEMNIFY?AND?HOLD?BORLAND?SOFTWARE?ITS
?*?RELATED?COMPANIES?AND?ITS?SUPPLIERS?HARMLESS?FROM?AND?AGAINST?ANY
?*?CLAIMS?OR?LIABILITIES?ARISING?OUT?OF?THE?USE?REPRODUCTION?OR
?*?DISTRIBUTION?OF?YOUR?PROGRAMS?INCLUDING?ANY?CLAIMS?OR?LIABILITIES
?*?ARISING?OUT?OF?OR?RESULTING?FROM?THE?USE?MODIFICATION?OR
?*?DISTRIBUTION?OF?PROGRAMS?OR?FILES?CREATED?FROM?baseD?ON?AND/OR
?*?DERIVED?FROM?THIS?SOURCE?CODE?FILE.
?*/
//------------------------------------------------------------------------------
//?Copyright?(c)?1996-2004?Borland?Software?Corporation.??All?Rights?Reserved.
//------------------------------------------------------------------------------
package?com.borland.samples.chess;
import?java.io.Serializable;
/**
?*?The?data?type?held?in?the?player?ListModel?of?ChessViewer.
?*/
public?class?ListData?implements?Serializable{
private?String?data;
private?Type?type;
/**
?*?Indicates?that?the?data?is?a?filename?for?a?game?from?the?Library.
?*/
public?static?final?Type?LIBRARY?=?new?Type(“L“);
/**
?*?Indicates?that?the?data?is?a?filename?for?a?suspended?game.
?*/
public?static?final?Type?SAVED_GAME?=?new?Type(“G“);
/**
?*?Indicates?that?the?data?is?a?filename?for?a?game?that?is?currently?in?progress.
?*/
public?static?final?Type?ACTIVE_GAME?=?new?Type(“A“);
/**
?*?Indicates?that?the?data?is?the?userid?for?a?player?that?is?logged?and?available?for?a?game.
?*/
public?static?final?Type?Player?=?new?Type(“P“);
static?final?long?serialVersionUID?=?6698501905225650088L;
??/**
???????*?Create?an?instance?consisting?of?the?String?representaion?of?the?data?along
???*?with?its?Type.
???*
???*?@param?data?String
???*?@param?type?Type
???*/
??public?ListData(String?data?Type?type)?{
this.data?=?data;
this.type?=?type;
}
/**
?*?Return?the?String?representation?of?the?data.
?*?@return?the?String?representation.
?*/
public?String?toString()?{
return?data;
}
/**
?*?Return?whether?this?object?represents?a?Saved?(Suspended)?Game.
?*?@return?true?if?this?object?represents?a?Saved?Game?false?otherwise.
?*/
public?boolean?isSavedGame()?{
return?type?==?SAVED_GAME;
}
/**
?*?Return?whether?this?object?represents?a?idle?logged?on?player.
?*?@return?true?if?this?object?represets?a?player?false?otherwise.
?*/
public?boolean?isPlayer()?{
return?type?==?Player;
}
/**
?*?Return?whether?this?object?represents?a?Library?game.
?*?@return?t
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2005-12-29?00:08??chess\
?????文件????????2521??2005-12-28?21:10??chess\build.xm
?????文件????????2372??2005-12-28?23:44??chess\users.obj
?????文件????????5753??2002-04-24?03:48??chess\chessap
?????目錄???????????0??2005-12-29?00:08??chess\Suspended\
?????文件?????????115??2005-12-28?23:42??chess\Suspended\10121011103.pgn
?????目錄???????????0??2005-12-29?00:08??chess\com\
?????目錄???????????0??2005-12-29?00:08??chess\com\borland\
?????目錄???????????0??2005-12-29?00:08??chess\com\borland\samples\
?????目錄???????????0??2005-12-29?00:08??chess\com\borland\samples\chess\
?????文件????????1037??2005-12-28?21:17??chess\com\borland\samples\chess\ListData$Type.class
?????文件????????1433??2005-12-28?21:17??chess\com\borland\samples\chess\ListData.class
?????文件????????1895??2005-12-28?21:17??chess\com\borland\samples\chess\MessageProcessor.class
?????文件????????6188??2005-12-28?21:17??chess\com\borland\samples\chess\ServerMessage$1.class
?????文件????????2288??2005-12-28?21:17??chess\com\borland\samples\chess\ServerMessage.class
?????文件????????1177??2005-12-28?21:17??chess\com\borland\samples\chess\MessageType$1.class
?????文件????????1173??2005-12-28?21:17??chess\com\borland\samples\chess\MessageType$2.class
?????文件?????????987??2005-12-28?21:17??chess\com\borland\samples\chess\MessageType$3.class
?????文件????????1273??2005-12-28?21:17??chess\com\borland\samples\chess\MessageType$4.class
?????文件????????1122??2005-12-28?21:17??chess\com\borland\samples\chess\MessageType$5.class
?????文件?????????995??2005-12-28?21:17??chess\com\borland\samples\chess\MessageType$6.class
?????文件????????1281??2005-12-28?21:17??chess\com\borland\samples\chess\MessageType$7.class
?????文件????????1174??2005-12-28?21:17??chess\com\borland\samples\chess\MessageType$8.class
?????文件????????1135??2005-12-28?21:17??chess\com\borland\samples\chess\MessageType$9.class
?????文件????????1157??2005-12-28?21:17??chess\com\borland\samples\chess\MessageType$10.class
?????文件????????1173??2005-12-28?21:17??chess\com\borland\samples\chess\MessageType$11.class
?????文件????????1166??2005-12-28?21:17??chess\com\borland\samples\chess\MessageType$12.class
?????文件????????1376??2005-12-28?21:17??chess\com\borland\samples\chess\MessageType$13.class
?????文件????????1124??2005-12-28?21:17??chess\com\borland\samples\chess\MessageType$14.class
?????文件????????1128??2005-12-28?21:17??chess\com\borland\samples\chess\MessageType$15.class
?????文件????????1150??2005-12-28?21:17??chess\com\borland\samples\chess\MessageType$16.class
............此處省略207個文件信息
- 上一篇:模擬售票系統(tǒng)程序(完整版)
- 下一篇:java項目視頻連接.txt
評論
共有 條評論