package zh; import java.io.File; import java.io.FileNotFoundException; import java.util.Scanner; public class Main { final int size = 20; char[][] table; Jatek jatek; public static void main(String[] args) throws FileNotFoundException, AknakeresoException { Main main = new Main(); main.init(); } public void init() throws FileNotFoundException, AknakeresoException { Scanner scanner = new Scanner(new File("table.txt")).useDelimiter("\n"); int counter = 0; table = new char[size][size]; while (scanner.hasNext()) { String line = scanner.nextLine(); for (int i = 0; i < size; i++) { table[counter][i] = line.charAt(i); } counter++; } jatek = new Jatek(table); System.out.println(jatek.toString()); } }