Hello guys, it's me again with the Flappy Bird game. I'd like to make a 'best score' method that is saved in a txt file that i've created. And i need it to always show the best score on the death screen.
Here's what i managed to do (steal) so far:
It just saves the last score to the txt file.
BufferedWriter file = null; try { file = new BufferedWriter(new FileWriter("score.txt")); file.write(""+score); file.close(); } catch (IOException ioe) { ioe.printStackTrace(); } finally { try { file.close(); } catch (IOException ioe) { ioe.printStackTrace(); } }