Пример #1
0
        private GameHandler()
        {
            this.config = Config.loadConfig();
            this.timer  = new Timer(config.roundDuration);
            if (config.databaseType.ToLower() == "mysql")
            {
                this.dataStorage = new MySQLHandler();
                Console.WriteLine("Enabled MYSQL");
            }
            else
            {
                this.dataStorage = new DBQueryDummy();
                Console.WriteLine("Dummy DB");
            }
            Game lastgame = dataStorage.loadLastGameData();

            this.game = new Game(lastgame == null ? 1 : lastgame.id + 1);
        }
Пример #2
0
 public DataBaseController()
 {
     dbquery = new MySQLHandler();
 }