case GAGNANT:
findepartie();
if (vue.win() == 1) {
Partie modele = new Partie();
modele.configuration();
JeuGraphique vue = new JeuGraphique();
vue.setModele(modele);
} else {
URL url;
try {
url = new URL("http://localhost:8080/SpringMVC_Annotation/jeu.htm?nom="+ConfigEnvironnement.getInstance().getPseudo() +"&findepartie=ok");
URLConnection urlConnection = url.openConnection();
BufferedReader in = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));
in.close();
} catch (MalformedURLException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (Exception ee) {
// TODO Auto-generated catch block
}
}
break;
//perdant
case PERDANT:
findepartie();
if (vue.lose() == 1) {
Partie modele = new Partie();
modele.configuration();
JeuGraphique vue = new JeuGraphique();
vue.setModele(modele);
} else {
URL url;
try {
url = new URL("http://localhost:8080/SpringMVC_Annotation/jeu.htm?nom="+ConfigEnvironnement.getInstance().getPseudo() +"&findepartie=ok");
URLConnection urlConnection = url.openConnection();
BufferedReader in = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));
in.close();
} catch (MalformedURLException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (Exception ee) {
// TODO Auto-generated catch block
}
}
break;
case SKIN:
vue.alerteSkin();
break;
case AUTRE:
break;
}
}