public InstructionDto ReadFileAndPutIntoInstruction(string FileName) { Instruction = new InstructionDto(); var lines = FileWrapper.ReadAllLines(FileName); int lineNumber = 0; foreach (var line in lines) { ParseLine(line, lineNumber++); } return(Instruction); }
public void InitializeGame(InstructionDto instruction) { foreach (var tile in instruction.tiles) { if (tile.tileType == TileType.MOUNTAIN) { Map.AddMountainToMap((Mountain)tile); } else { Map.AddTreasureToMap((Treasure)tile); } } AdventurerList = instruction.adventurer; AddPlayerToMap(); }