Guest User

Untitled

a guest
May 27th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. File file = new File(System.getProperty("user.home")+ "/dungeon.map");
  2. Scanner scanner = new Scanner(file).useDelimiter("\n");
  3. contains = new ArrayList<String>();
  4. while(scanner.hasNext())
  5. {
  6. contains.add(scanner.next());
  7. }
  8. for(int i = 0; i < contains.size(); i++)
  9. {
  10. String[] thisLine = new String[5];
  11.  
  12. thisLine = contains.get(i).split(" ");
  13.  
  14. String str1 = thisLine[0];
  15. String str2 = thisLine[1];
  16. String str3 = thisLine[2];
  17. String str4 = thisLine[3];
  18. String str5 = thisLine[4];
Add Comment
Please, Sign In to add comment