📄 gameroom.java
字号:
/*
* 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -