public boolean cambia (int valore) {
        try {
            f2 = new FileWriter("statistiche.txt");
            fOUT = new PrintWriter(f2);
            
            switch (valore) {
                case 0:                   
                    fOUT.print("0;0;0;");                                                          
                    break;
                case 1:
                    statistiche[0] = statistiche[0] + 1;
                    statistiche[1] = statistiche[1] + 1;
                    fOUT.print(String.valueOf(statistiche[0]) + ";" + String.valueOf(statistiche[1]) + ";" + String.valueOf(statistiche[2]));
                    break;
                case 2:
                    statistiche[0] = statistiche[0] + 1;
                    statistiche[2] = statistiche[2] + 1;
                    fOUT.print(String.valueOf(statistiche[0]) + ";" + String.valueOf(statistiche[1]) + ";" + String.valueOf(statistiche[2]));
                    break;
            }
            fOUT.close();
            f2.close();
        }
        catch (FileNotFoundException ex) {
            return true;
        }
        catch (IOException ex) {
            return true;
        }
        return false;
    }