public void TestFixtureSetUp()
        {
            _path = Path.GetFullPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"..\..\DataOut"));

            _xmlDb = new XmlDataBase(_path);
            _fileDb = new FileDataBase(_path);

            _xmlRepository = new Repository(_xmlDb);
            _fileRepository = new Repository(_fileDb);

            // steb by step | write file -> read file -> delete file
        }
Пример #2
0
        public void TestFixtureSetUp()
        {
            _path = Path.GetFullPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"..\..\DataOut"));

            _xmlDb  = new XmlDataBase(_path);
            _fileDb = new FileDataBase(_path);

            _xmlRepository  = new Repository(_xmlDb);
            _fileRepository = new Repository(_fileDb);

            // steb by step | write file -> read file -> delete file
        }
Пример #3
0
 public RaceGame(ShortChat msg, MyGame psyGame, FileDataBase fakeDB, SSPlayerManager Players, BaseManager BaseManager, bool Multi, int GameNum)
 {
     this.msg           = msg;
     this.psyGame       = psyGame;
     this.m_FakeDB      = fakeDB;
     this.m_MultiOn     = Multi;
     this.m_GameNum     = GameNum;
     this.m_Players     = Players;
     this.m_BaseManager = BaseManager;
     this.m_Lobby       = m_BaseManager.Lobby;
     this.m_Racers      = new List <string>();
     this.m_Status      = RaceState.NotStarted;
     this.m_Timer       = new Timer();
     this.loadNextBase();
 }
Пример #4
0
    private void PopulateRepository(FileDataBase dbHandler, Dictionary <long, DatabaseModel> models)
    {
        int count = 0;

        foreach (string line in dbHandler.ReadLine())
        {
            // We skip the first 2 lines
            if (count > lineSkip)
            {
                // Debug.Log(line);
                DatabaseModel model = DatabaseModel.FromString(line);
                models.Add(model.Id, model);
            }

            count++;
        }
    }
Пример #5
0
 void Start()
 {
     dbHandler = new FileDataBase(repositoryPath);
     PopulateRepository(dbHandler, models);
 }
Пример #6
0
        public BaseRace(BaseManager BaseManager, SSPlayerManager PlayerManager, ShortChat msg, MyGame psyGame, FileDataBase fakeDB, DisplayManager gfx, string ArenaName)
        {
            this.m_FakeDB = fakeDB;
            this.m_GFX    = gfx;
            m_GFX.RegisterScoreBoard("TestBoard", 20, 4);
            m_GFX.LoadScoreBoard_Public("TestBoard");
            m_GFX.ScoreChange_Public("TestBoard", 0);
            this.msg           = msg;
            this.psyGame       = psyGame;
            this.m_ArenaName   = ArenaName;
            this.m_BaseManager = BaseManager;
            this.m_Players     = PlayerManager;
            this.m_MultiGame   = false;

            this.m_FreqStartIndex = 1337;

            this.m_BlockedList = new List <string>();
            this.m_CustomStaff = new List <string>();

            // Only set this if you want module loaded by default
            this.BaseRace_Load(" * Auto Load *");

            this.m_CustomStaff.Add("Ahmad~");
            this.m_CustomStaff.Add("zxvf");
            this.m_CustomStaff.Add("Devastated");
            this.m_CustomStaff.Add("Neostar");
            this.m_CustomStaff.Add("jDs");
        }