www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit bd646176651d3eaec51322787e51dbeed4f35da8
parent 5f166574b0d74311ec60c9b8c100e43e4ba123ff
Author: Bertrand BRUN <bertrand0brun@gmail.com>
Date:   Tue,  1 Feb 2011 04:02:37 +0100

Correction mineur dans Score et GamePlayed
Diffstat:
Mcode/PtiClic/src/org/pticlic/Score.java | 25++++++++++++-------------
Mcode/PtiClic/src/org/pticlic/model/GamePlayed.java | 3+--
2 files changed, 13 insertions(+), 15 deletions(-)

diff --git a/code/PtiClic/src/org/pticlic/Score.java b/code/PtiClic/src/org/pticlic/Score.java @@ -4,14 +4,14 @@ import org.pticlic.model.Constant; import org.pticlic.model.GamePlayed; import android.app.Activity; -import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; +import android.widget.Button; public class Score extends Activity implements OnClickListener{ - private GamePlayed gamePlayed; + private GamePlayed gamePlayed; @Override protected void onCreate(Bundle savedInstanceState) { @@ -22,19 +22,18 @@ public class Score extends Activity implements OnClickListener{ // Pour JC : GamePlayed contient toutes les infos sur la partie jouee this.gamePlayed = (GamePlayed) getIntent().getExtras().get(Constant.SCORE_INTENT); } -// ((TextView)findViewById(R.id.corrects)).setText("Mots corrects : " -// + this.corrects); -// ((TextView)findViewById(R.id.manquants)).setText("Mots manquants : " -// + this.manquants); -// ((TextView)findViewById(R.id.mauvais)).setText("Mots mauvais : " -// + this.mauvais); -// ((TextView)findViewById(R.id.total)).setText("Total de " + total -// + "point(s)"); -// ((Button)findViewById(R.id.jaivu)).setOnClickListener(this); + + ((Button)findViewById(R.id.jaivu)).setOnClickListener(this); + } + @Override + public void onBackPressed() { + super.onBackPressed(); + + finish(); + } - protected double calculateTotal(){ throw new UnsupportedOperationException(); //return this.corrects - this.manquants - this.mauvais; @@ -43,7 +42,7 @@ public class Score extends Activity implements OnClickListener{ @Override public void onClick(View v) { if (v.getId()==R.id.jaivu) { - startActivity(new Intent(this, Main.class)); + finish(); } } diff --git a/code/PtiClic/src/org/pticlic/model/GamePlayed.java b/code/PtiClic/src/org/pticlic/model/GamePlayed.java @@ -21,7 +21,7 @@ public class GamePlayed implements Serializable { public void setGame(Game game) { this.game = game; - } + } public Game getGame() { return game; @@ -35,5 +35,4 @@ public class GamePlayed implements Serializable { case 4: relation4.add(word); break; } } - }