package sfs.cluster.lobby.data;

import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;

/**
 * Holds the informations related to game rooms
 */
public class ClusterRoom
{
	private String name;								// name of the room
	private int localID;								// local id on the server instance
	private int gameID;									// id of the game		
	private String gameType;							// type of the game
	private int maxPlayers;								// max number of players allowed
	private AtomicInteger playerCount;					// current number of players
	private boolean passwordProtected;					// is the room password protected? (not used for this demo)
	
	public Map<String, Object> properties;
	
	public ClusterRoom(String name)
    {
		this.name = name;
		this.passwordProtected = false;
		this.playerCount = new AtomicInteger(0);
		
    }

	public String getName()
    {
    	return name;
    }

	public void setName(String name)
    {
    	this.name = name;
    }

	public int getLocalID()
    {
    	return localID;
    }

	public void setLocalID(int localID)
    {
    	this.localID = localID;
    }

	public int getGameID()
    {
    	return gameID;
    }

	public void setGameID(int gameID)
    {
    	this.gameID = gameID;
    }

	public int getMaxPlayers()
    {
    	return maxPlayers;
    }

	public void setMaxPlayers(int maxPlayers)
    {
    	this.maxPlayers = maxPlayers;
    }

	public AtomicInteger getPlayerCount()
    {
    	return playerCount;
    }

	public void setPlayerCount(int playerCount)
    {
    	this.playerCount.set(playerCount);
    }

	public Map<String, Object> getProperties()
    {
    	return properties;
    }

	public void setProperties(Map<String, Object> properties)
    {
    	this.properties = properties;
    }

	public boolean isPasswordProtected()
    {
    	return passwordProtected;
    }

	public void setPasswordProtected(boolean passwordProtected)
    {
    	this.passwordProtected = passwordProtected;
    }

	public String getGameType()
    {
    	return gameType;
    }

	public void setGameType(String gameType)
    {
    	this.gameType = gameType;
    }
	
	
	
}
