made Dungeoun.buildDungeon() avoid exceptions when parsing bad files
This commit is contained in:
parent
a9939b3600
commit
872ea1170d
@ -1,5 +1,9 @@
|
|||||||
package cicaprojekt;
|
package cicaprojekt;
|
||||||
|
|
||||||
|
import com.sun.tools.javah.Util;
|
||||||
|
import sun.management.Agent;
|
||||||
|
|
||||||
|
import javax.swing.*;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -185,6 +189,12 @@ public class Dungeon {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
JOptionPane.showMessageDialog(null, "Hiba a dungeon fájl beolvasásakor! Biztosan jól formázott az a fájl? Az alkalmazás leáll.");
|
||||||
|
System.exit(1);
|
||||||
|
// TODO manage to recover from this error without exiting the application
|
||||||
|
}
|
||||||
|
|
||||||
Map<String, Tile> playermap = new HashMap<>();
|
Map<String, Tile> playermap = new HashMap<>();
|
||||||
playermap.put("oneill", oneilllocation);
|
playermap.put("oneill", oneilllocation);
|
||||||
|
Loading…
Reference in New Issue
Block a user