gameroom.java
来自「是一款国外的网络游戏平台的源码*不是类似浩方那种虚拟局域网技术」· Java 代码 · 共 65 行
JAVA
65 行
/*
* Created on Oct 31, 2005
*
* Game room is a chatroom derived class that represents games
* started by users. The framework is almost identical to the
* chatroom class except for a few game specific extras that will be thrown in
*/
package org.GTADS.usermanager;
/**
* @author sday
*
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public class GameRoom extends Chatroom {
private String gameType;
private int maxPlayers;
public static String GTA_1 = "GTA1";
public static String GTA_LONDON = "GTA London";
public static String AGE_OF_EMPIRES_1 = "Age of Empires I";
public static String AGE_OF_EMPIRES_RISE_TO_ROME = "Age of Empires: Rise to Rome";
public static String AGE_OF_EMPIRES_2 = "Age of Empires II";
public static String AGE_OF_EMPIRES_2_CONQ = "Age of Empires II: Conquerors";
private boolean proxyStarted;
private String IPBind = null;
public GameRoom(User chatroomCreator, String chatroomName, String gameType, int maxPlayers) {
super(chatroomCreator, chatroomName);
this.maxPlayers = maxPlayers;
this.gameType = gameType;
this.proxyStarted = false;
}
public String getGameType (){
return gameType;
}
public int getMaxPlayers(){
return maxPlayers;
}
public int getNumPlayers(){
int numPlayers = super.getListOfUsers().size();
return numPlayers;
}
public String getBindIP(){
return IPBind;
}
public void setBindIP(String IPBind){
this.IPBind = IPBind;
}
public boolean getStatus(){
return proxyStarted;
}
public String getStatusAsString(){
return proxyStarted ? "1" : "0";
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?