Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void levelLoad(int _numLevel) {
- int numLevel=_numLevel;
- try {//Création et ouverture d'un flux de lecture
- FileInputStream fstream = new FileInputStream("level"+numLevel+".txt");
- DataInputStream in = new DataInputStream(fstream);
- BufferedReader br = new BufferedReader(new InputStreamReader(in));
- String strLine;
- int numligne = 0;
- while((strLine = br.readLine()) !=null) {
- String[] tampon = strLine.split(";");
- for (int i=0; i<22; i++) {
- lvl[i][numligne]=tampon[i];
- }
- System.out.println(strLine);
- numligne++;
- }
- in.close();
- }
- catch (Exception e) {
- System.err.println("Erreur :"+e.getMessage());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement