/// <summary> /// Загрузить игровой уровень /// </summary> public void LoadLevel(int level) { _map = _converter.GetLevelByNumber(level); _platforms = _converter.GetLevelPlatformsByNumber(level); _solution = _converter.GetLevelSolutionByNumber(level); _grid = new Grid(_manager.Helper.pointModel, _manager.Helper.platformModel, _map, _solution, _platforms); SpawnPlayer(); }
public void Level_LevelConverter_Test() { var converter = new LevelConverter(); var level25ByIndex = converter.GetLevelByIndex(24); var level25ByNumber = converter.GetLevelByNumber(25); Assert.AreEqual(level25ByIndex, level25ByNumber); Assert.AreEqual(level25ByNumber, "6-1;5-1;5-2;5-3;5-4;4-2;4-3;3-0;3-3;2-1;2-4;1-4;1-2;0-3"); }