package sfs3.extensions.examples.spacewar2.util;

public final class Constants
{
	// CONFIGURATION
	public static final String CONFIG_SETTINGS = "settings";
	public static final String CONFIG_LEVELS = "levels";
	public static final String CONFIG_LEVEL = "level";
	public static final String CONFIG_STARSHIPS = "starships";
	public static final String CONFIG_WEAPONS = "weapons";

	public static final String SETTING_MIN_PLAYERS = "minPlayersToStart";
	public static final String SETTING_ALLOW_MIDGAME_JOIN = "allowMidGameJoin";
	public static final String SETTING_GAME_ABORT_SECS = "gameAbortSeconds";
	public static final String SETTING_GAME_START_SECS = "gameStartSeconds";
	public static final int SETTING_MAX_USER_XP = 5;
	
	public static final String ROOMS_GROUP_NAME = "spacewar2";
	
	// GAME STATE
	public static final int GAMESTATE_WAITING = 0;
	public static final int GAMESTATE_RUNNING = 1;
	public static final int GAMESTATE_OVER = 2;
	
	// ROOM VARIABLES
	public static final String ROOMVAR_GAME_LEVEL = "gameLevel";
	public static final String ROOMVAR_GAME_STATE = "gameState";
	public static final String ROOMVAR_USER_MIN_XP = "userMinXp";
	
	// USER VARIABLES
	public static final String USERVAR_EXPERIENCE = "xp";
	public static final String USERVAR_SHIP_MODEL = "sModel";
	public static final String USERVAR_X = "x";
	public static final String USERVAR_Y = "y";
	public static final String USERVAR_VX = "vx";
	public static final String USERVAR_VY = "vy";
	public static final String USERVAR_DIR = "d";
	public static final String USERVAR_THRUST = "t";
	public static final String USERVAR_ROTATE = "r";
	public static final String USERVAR_SHIELD = "s";
	public static final String USERVAR_WEAPON = "w";
	
	// MMOITEM VARIABLES
	public static final String ITEMVAR_TYPE = "iType";
	public static final String ITEMVAR_MODEL = "iModel";
	public static final String ITEMVAR_X = "x";
	public static final String ITEMVAR_Y = "y";
	public static final String ITEMVAR_VX = "vx";
	public static final String ITEMVAR_VY = "vy";
	
	// MMOITEM TYPES
	public static final String ITEMTYPE_WEAPON = "weapon";
	
	// REQUESTS FROM CLIENT
	public static final String REQ_INIT = "init";
	public static final String REQ_CONTROL = "control";
	public static final String REQ_INIT_ERROR = "initErr";
	
	// SUB-REQUESTS FROM CLIENT (MULTIHANDLER)
	public static final String REQ_INIT_READY = "ready";
	public static final String REQ_INIT_SHIP = "ship";
	public static final String REQ_INIT_INVITE = "invite";
	public static final String REQ_CONTROL_ROTATE = "rotate";
	public static final String REQ_CONTROL_THRUST = "thrust";
	public static final String REQ_CONTROL_FIRE = "fire";
	public static final String REQ_CONTROL_JUMP = "jump";
	
	// RESPONSES TO CLIENT
	public static final String RESP_CONFIG = "config";
	public static final String RESP_COUNTDOWN = "count";
	public static final String RESP_LEAVE = "leave";
	public static final String RESP_START = "start";
	public static final String RESP_SHOT_XPLODE = "shot_xplode";
	public static final String RESP_SHIP_XPLODE = "ship_xplode";
	public static final String RESP_GAME_OVER = "game_over";
}
