Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
Message.java
Package: java五子棋.zip [view]
Upload User: ptnike
Upload Date: 2007-06-15
Package Size: 61k
Code Size: 2k
Category:
Chess Poker games
Development Platform:
Java
- import java.io.Serializable;
- /**
- * <p>Title: </p>
- * <p>Description: </p>
- * <p>Copyright: Copyright (c) 2003</p>
- * <p>Company: e-top</p>
- * @author cylix
- * @version 1.0
- */
- /**
- * message list
- * type = 1 // request of connected,msg = connector's name
- * type = 2 // put chessman
- * type = 3 // request play with another
- * type = 4 // deny a request for play
- * type = 5 // agree with request
- * type = 6 // send victory message
- * type = 7 // send disconnection
- * type = 8 // save game but not to disk,it will be lost when next start
- * type = 9 // add new player to all client's player list
- * type = 10// response for message type ==1
- * type = 11// play with a player,msg save player's name ,game set by
- * // the one who create game
- * type = 12// setting information
- * type = 13// setting player color
- * type = 14// msg for acceptor B to setting color and setings
- * type = 15// server update message
- * type = 16// send messages of control or errors
- * type = 17// failed in the game
- * type = 18// server socket close
- * type = 19// player end a game and refresh
- * tyep = 20// computer win / people win
- */
- public class Message implements Serializable{
- byte type; // message type ,eg.1=request of connection
- boolean setting; // 是否设置禁手
- int color; // chessman color ,1 = black ,2 = white
- boolean forYourTurn; // judge whether it is for receiver's turn
- int coordinateX; // record the coordinate X from 0~14 ,save black or white
- int coordinateY; // record the coordinate Y from 0~14 ,save black or white
- char[] msg; // message body
- public Message(){
- setting=true;
- msg = new char[50];
- // StringBuffer ss = new StringBuffer(50);
- }
- }///:-)