如何用Java实现网络中国象棋室(二)
2008-05-23 18:49
483 查看
google_ad_client = "pub-8800625213955058";
/* 336x280, 创建于 07-11-21 */
google_ad_slot = "0989131976";
google_ad_width = 336;
google_ad_height = 280;
//
2、象棋服务主类,接收用户登录连接,和用户的数据处理和转发:
package sunstudio;
import sunstudio.event.*;
import java.util.*;
import java.net.*;
import java.io.*;
import sunstudio.util.*;
public class ChessServer implements LoginListener{
int tablecount=20;
ChessTable[] tb=new ChessTable[tablecount];
Hashtable userlist=new Hashtable();
public ServerSocket ss=null;
ChessLogin cl=null;
public static ChessServer hwnd=null;
public static void main(String[] args){
ChessServer server=new ChessServer();
}
public ChessServer(){
for(int i=0;i19)return;
/* 336x280, 创建于 07-11-21 */
google_ad_slot = "0989131976";
google_ad_width = 336;
google_ad_height = 280;
//
2、象棋服务主类,接收用户登录连接,和用户的数据处理和转发:
package sunstudio;
import sunstudio.event.*;
import java.util.*;
import java.net.*;
import java.io.*;
import sunstudio.util.*;
public class ChessServer implements LoginListener{
int tablecount=20;
ChessTable[] tb=new ChessTable[tablecount];
Hashtable userlist=new Hashtable();
public ServerSocket ss=null;
ChessLogin cl=null;
public static ChessServer hwnd=null;
public static void main(String[] args){
ChessServer server=new ChessServer();
}
public ChessServer(){
for(int i=0;i