예제 #1
0
 public Fleets(DiscordSocketClient client, IFleetStorage fleets, IFleetBattleQueue battles, IFleetRankings rankings)
 {
     _client   = client;
     _fleets   = fleets;
     _battles  = battles;
     _rankings = rankings;
 }
예제 #2
0
 public FleetAdmin(Configuration config, IFleetStorage fleets, IFleetRankings rankings, IFleetBattleQueue battles)
 {
     _config   = config;
     _fleets   = fleets;
     _rankings = rankings;
     _battles  = battles;
 }
 public BattleQueueExecutor(Configuration config, DiscordSocketClient client, IFleetBattleQueue queue, IFleetStorage fleets, IFleetRankings ranks)
 {
     _config = config;
     _client = client;
     _queue  = queue;
     _fleets = fleets;
     _ranks  = ranks;
 }
예제 #4
0
        public DbFleetBattleQueue(IDatabase db, IFleetRankings ranks)
        {
            _db    = db;
            _ranks = ranks;

            try
            {
                _db.Exec(
                    "CREATE TABLE IF NOT EXISTS 'FleetsBattleQueue' (" +
                    "'FleetId1' INTEGER NOT NULL," +
                    "'FleetId2' INTEGER NOT NULL," +
                    "PRIMARY KEY('FleetId1','FleetId2'));"
                    );
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }