basically have make game , need create room reading file, one: # # 0 d room0.txt 0 # 1 e room1.txt 0 # wwww0wwwww w w w w w w w w w w w w w w w w w w w 1 wwwwwwwwww the "#" means can skip lines(they're information) , "w" places need put wall, numbers doors , blank spaces floor. i figured best way create room create method receives file , reads , put "information" string[10][10], , create method(or in main) receives string[10][10] created , creates room(adds images room), having difficulties reading file if guys me part thankful. the error when run program on line: if(r[x][y].equals("w")) if guys need class, image of game should or else forgot show please let me know , help. public void generateroom(file file){ if(file.exists()){ scanner sc = null; string[][] r = new string[10][]; int row = 0; try { sc = new scanner(fi...
Comments
Post a Comment