public Game(CoreServer server) { State = GameState.Lobby; IsMatch = Config.GetInt("Mode") == 1; IsTag = Config.GetInt("Mode") == 2; CurrentPlayer = 0; LifePoints = new int[2]; Players = new Player[IsTag ? 4 : 2]; CurPlayers = new Player[2]; IsReady = new bool[IsTag ? 4 : 2]; _handResult = new int[2]; _timelimit = new int[2]; Winner = -1; MatchResults = new int[3]; MatchReasons = new int[3]; Observers = new List <Player>(); int lfList = Config.GetInt("Banlist"); if (lfList >= 0 && lfList < BanlistManager.Banlists.Count) { Banlist = BanlistManager.Banlists[lfList]; } LifePoints[0] = Config.GetInt("StartLp", DEFAULT_LIFEPOINTS); LifePoints[1] = Config.GetInt("StartLp", DEFAULT_LIFEPOINTS); _server = server; _analyser = new GameAnalyser(this); }
public Game(CoreServer server) { State = GameState.Lobby; IsMatch = Config.GetInt("Mode") == 1; IsTag = Config.GetInt("Mode") == 2; CurrentPlayer = 0; LifePoints = new int[2]; Players = new Player[IsTag ? 4 : 2]; CurPlayers = new Player[2]; IsReady = new bool[IsTag ? 4 : 2]; _handResult = new int[2]; _timelimit = new int[2]; Winner = -1; MatchResults = new int[3]; MatchReasons = new int[3]; Observers = new List<Player>(); int lfList = Config.GetInt("Banlist"); if (lfList >= 0 && lfList < BanlistManager.Banlists.Count) Banlist = BanlistManager.Banlists[lfList]; LifePoints[0] = Config.GetInt("StartLp", DEFAULT_LIFEPOINTS); LifePoints[1] = Config.GetInt("StartLp", DEFAULT_LIFEPOINTS); _server = server; _analyser = new GameAnalyser(this); }
public Game(CoreServer server) { State = GameState.Lobby; Mode = Config.GetInt("Mode"); Region = Config.GetInt("Rule", -1); if (Region != -1) { Console.Error.WriteLine("'Rule' is deprecated, please use 'Region' instead."); } else { Region = Config.GetInt("Region"); } MasterRule = Config.GetInt("MasterRule", 3); IsMatch = Mode == 1; IsTag = Mode == 2; CurrentPlayer = 0; LifePoints = new int[2]; Players = new Player[IsTag ? 4 : 2]; CurPlayers = new Player[2]; IsReady = new bool[IsTag ? 4 : 2]; _handResult = new int[2]; _timelimit = new int[2]; Winner = -1; MatchResults = new int[3]; MatchReasons = new int[3]; Observers = new List <Player>(); int lfList = Config.GetInt("Banlist"); if (lfList >= 0 && lfList < BanlistManager.Banlists.Count) { Banlist = BanlistManager.Banlists[lfList]; } StartLp = Config.GetInt("StartLp", DEFAULT_LIFEPOINTS); LifePoints[0] = StartLp; LifePoints[1] = StartLp; StartHand = Config.GetInt("StartHand", DEFAULT_START_HAND); DrawCount = Config.GetInt("DrawCount", DEFAULT_DRAW_COUNT); EnablePriority = Config.GetBool("EnablePriority"); NoCheckDeck = Config.GetBool("NoCheckDeck"); NoShuffleDeck = Config.GetBool("NoShuffleDeck"); Timer = Config.GetInt("GameTimer", DEFAULT_TIMER); _server = server; _analyser = new GameAnalyser(this); }
public Game(CoreServer server, CoreConfig config) { Config = config; State = GameState.Lobby; IsMatch = config.Mode == 1; IsTag = config.Mode == 2; CurrentPlayer = 0; LifePoints = new int[2]; Players = new Player[IsTag ? 4 : 2]; CurPlayers = new Player[2]; IsReady = new bool[IsTag ? 4 : 2]; _handResult = new int[2]; _timelimit = new int[2]; _matchResult = new int[3]; Observers = new List<Player>(); if (config.LfList >= 0 && config.LfList < BanlistManager.Banlists.Count) Banlist = BanlistManager.Banlists[config.LfList]; _server = server; _analyser = new GameAnalyser(this); ReloadGameConfig(); }
public Game(CoreServer server, CoreConfig config) { Config = config; State = GameState.Lobby; IsMatch = config.Mode == 1; IsTag = config.Mode == 2; CurrentPlayer = 0; LifePoints = new int[2]; Players = new Player[IsTag ? 4 : 2]; CurPlayers = new Player[2]; IsReady = new bool[IsTag ? 4 : 2]; _handResult = new int[2]; _timelimit = new int[2]; _matchResult = new int[3]; Observers = new List <Player>(); if (config.LfList >= 0 && config.LfList < BanlistManager.Banlists.Count) { Banlist = BanlistManager.Banlists[config.LfList]; } _server = server; _analyser = new GameAnalyser(this); ReloadGameConfig(); }
public Game(CoreServer server) { State = GameState.Lobby; Mode = Config.GetInt("Mode"); Rule = Config.GetInt("Rule"); IsMatch = Mode == 1; IsTag = Mode == 2; CurrentPlayer = 0; LifePoints = new int[2]; Players = new Player[IsTag ? 4 : 2]; CurPlayers = new Player[2]; IsReady = new bool[IsTag ? 4 : 2]; _handResult = new int[2]; _timelimit = new int[2]; Winner = -1; MatchResults = new int[3]; MatchReasons = new int[3]; Observers = new List<Player>(); int lfList = Config.GetInt("Banlist"); if (lfList >= 0 && lfList < BanlistManager.Banlists.Count) Banlist = BanlistManager.Banlists[lfList]; StartLp = Config.GetInt("StartLp", DEFAULT_LIFEPOINTS); LifePoints[0] = StartLp; LifePoints[1] = StartLp; StartHand = Config.GetInt("StartHand", DEFAULT_START_HAND); DrawCount = Config.GetInt("DrawCount", DEFAULT_DRAW_COUNT); EnablePriority = Config.GetBool("EnablePriority"); NoCheckDeck = Config.GetBool("NoCheckDeck"); NoShuffleDeck = Config.GetBool("NoShuffleDeck"); Timer = Config.GetInt("GameTimer", DEFAULT_TIMER); _server = server; _analyser = new GameAnalyser(this); }