Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 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();
 }