void loadWorld()
      {
      
           try{
         
     String inpath ="Data//save.txt";
            try (FileInputStream fstream = new FileInputStream(inpath)) {
                DataInputStream in = new DataInputStream(fstream);
                List<String> worldLines;
                List<String> mapLines;
                List<String> taskLines;
                List<String> creatureLines;
                List<String> itemLines;
                try (BufferedReader br = new BufferedReader(new InputStreamReader(in))) {
                    List<String> readLines = new ArrayList<>();
                    String sLine;
                    while( (sLine = br.readLine()) !=null )
                  {   
                     readLines.add(sLine);
                  } worldLines = new ArrayList<>();
                    mapLines = new ArrayList<>();
                    taskLines = new ArrayList<>();
                    creatureLines = new ArrayList<>();
                    itemLines = new ArrayList<>();
                    int readcount = 0;
                    for(int i=0; i<readLines.size(); i++)
                    {
                    if("#ENDBLOCK#".equals(readLines.get(i)))
                    { 
                        readcount++; 
                        continue;
                    }
                    
                    switch(readcount)
                        {
                        case 0: worldLines.add(readLines.get(i)); break;
                        case 1: mapLines.add(readLines.get(i)); break;
                        case 2: taskLines.add(readLines.get(i)); break; 
                        case 3: creatureLines.add(readLines.get(i)); break;
                        case 4: itemLines.add(readLines.get(i)); break;    
                        }
                    
                    }
                }
                  
              this.money = Integer.valueOf(worldLines.get(0));
              
              map = null;
              map = new TileMap(mapLines); 
            
              this.taskManager = null;
              this.taskFactory = null;
              this.taskFactory = new TaskFactory();
              this.taskManager = new TaskManager(this);
              
              taskManager.loadTasks(taskLines);
              
              
              this.creatueCollection = null;
              creatueCollection = new CreatureCollection();
              this.creatureFactory = null;
              creatureFactory = new CreatureFactory();
              creatueCollection.loadCreatures(creatureLines, taskManager);
              
              
              this.itemFactory = null;
              this.itemFactory = new ItemFactory();
              this.itemCollection = new ItemCollection();
              itemCollection.loadItems(itemLines);
            }
          
     }catch(IOException | NumberFormatException e){System.out.println("Error while loading"); System.exit(0);
        }
          
          
          
      
      }