Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void newTree(int x, int y){
- File f = new File("tree_"+ x +"_"+y+ ".txt");
- try {
- if(!f.exists()){
- oos = new ObjectOutputStream(
- new BufferedOutputStream(
- new FileOutputStream(
- new File("game.txt"))));
- for (int i = 0;i < 40 ; i++){
- //Nous allons �crire chaque objet Game dans le fichier
- oos.writeObject(new Game(41 ,i, 1,5,1,20,1));
- }
- //NE PAS OUBLIER DE FERMER LE FLUX ! ! !
- oos.close();
- }
- //On r�cup�re maintenant les donn�es !
- //On r�cup�re maintenant les donn�es !
- TreeRead tree = new TreeRead();
- tree.treeRead();
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
Add Comment
Please, Sign In to add comment