package quiniela; public class Partido { String juegaEnCasa; String juegaFuera; boolean[] pronostico = new boolean[3]; String unoequisdos="1X2"; public String getJuegaEnCasa() { return this.juegaEnCasa; } public void setJuegaEnCasa( String _newVal) { this.juegaEnCasa = _newVal ; } public String getJuegaFuera() { return this.juegaEnCasa; } public void setJuegaFuera( String _newVal) { this.juegaFuera = _newVal ; } public boolean[] getPronostico() { return this.pronostico; } public void setPronostico(boolean[] _newVal) { this.pronostico = pronostico; } public void setPronosticoAsString(String _newVal) { for ( int i=0; i < 3; i++ ) { // System.err.println( "SPAS : " + i + " -> " + this.unoequisdos + "-> " + this.unoequisdos.charAt(i) ); if ( _newVal.indexOf(this.unoequisdos.charAt(i)) >= 0 ) { this.pronostico[i] = true; } else { this.pronostico[i] = false; } } } public String getAsString() { String str=this.juegaEnCasa + "-" + this.juegaFuera + ": "; for ( int i = 0; i < 3; i ++ ) { if ( this.pronostico[i] ) { str += this.unoequisdos.charAt(i); } } return str; } public String getFormatted() { String str= "