daily pastebin goal
66%
SHARE
TWEET

Untitled

a guest Jan 12th, 2018 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.      * Lade Spielfeld
  3.      */
  4.     public void ladeSpielfeld() {
  5.         int i = 0, j = 0, index = 0;
  6.         char[] inhalt;
  7.         try {
  8.             BufferedReader br =
  9.               new BufferedReader(new FileReader("Speicher/spielstand.txt"));
  10.  
  11.             String zeile = br.readLine();
  12.            
  13.             while (zeile != null && j < gr*3) {
  14.                 i = 0;
  15.                 inhalt = zeile.toCharArray();
  16.                     for (index = 0; index < inhalt.length-1; index++) {
  17.                         System.out.print(inhalt.length);
  18.                        
  19.                         this.Spielfeld[i][j] = (int) inhalt[index];
  20.                         i++;
  21.                     }
  22.                     System.out.println();
  23.                 zeile = br.readLine();
  24.                 j++;
  25.             }
  26.            
  27.         } catch (IOException ioe) {
  28.             ioe.printStackTrace();  
  29.         }
  30.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top