⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gameroom.java

📁 是一款国外的网络游戏平台的源码*不是类似浩方那种虚拟局域网技术
💻 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 + -