Correction de quelque bug

This commit is contained in:
Bertrand BRUN 2011-01-31 21:15:55 +01:00
parent 5ee517c49b
commit 97e18f69ef
2 changed files with 2 additions and 40 deletions

View File

@ -2,7 +2,7 @@
<resources> <resources>
<string name="app_name">PtiClic</string> <string name="app_name">PtiClic</string>
<string name="prefs_name">Préférences</string> <string name="prefs_name">Préférences</string>
<string name="games_name">Jouer</string> <string name="play_label">Jouer</string>
<string name="textInfo">Ce projet a été réalisé l</string> <string name="textInfo">Ce projet a été réalisé l</string>
<color name="background">#FF0000</color> <color name="background">#FF0000</color>
</resources> </resources>

View File

@ -1,32 +1,15 @@
package org.pticlic; package org.pticlic;
<<<<<<< HEAD
import model.GamePlayed;
=======
import org.pticlic.model.Constant; import org.pticlic.model.Constant;
import org.pticlic.model.GamePlayed; import org.pticlic.model.GamePlayed;
>>>>>>> f74dc5006757fe52d362cf1a0d642d01dda7cf43
import android.app.Activity; import android.app.Activity;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.view.View; import android.view.View;
import android.view.View.OnClickListener; import android.view.View.OnClickListener;
<<<<<<< HEAD
import android.widget.Button;
import android.widget.TextView;
public class Score extends Activity implements OnClickListener{ public class Score extends Activity implements OnClickListener{
private double corrects;
private double manquants;
private double mauvais;
private double total;
=======
public class Score extends Activity implements OnClickListener{
>>>>>>> f74dc5006757fe52d362cf1a0d642d01dda7cf43
private GamePlayed gamePlayed; private GamePlayed gamePlayed;
@ -36,22 +19,6 @@ public class Score extends Activity implements OnClickListener{
setContentView(R.layout.score); setContentView(R.layout.score);
if (getIntent().getExtras() != null) { if (getIntent().getExtras() != null) {
<<<<<<< HEAD
this.corrects = getIntent().getExtras().getDouble("corrects");
this.manquants = getIntent().getExtras().getDouble("manquants");
this.mauvais = getIntent().getExtras().getDouble("mauvais");
this.total = this.calculateTotal();
}
((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);
=======
// Pour JC : GamePlayed contient toutes les infos sur la partie jouee // Pour JC : GamePlayed contient toutes les infos sur la partie jouee
this.gamePlayed = (GamePlayed) getIntent().getExtras().get(Constant.SCORE_INTENT); this.gamePlayed = (GamePlayed) getIntent().getExtras().get(Constant.SCORE_INTENT);
} }
@ -64,18 +31,13 @@ public class Score extends Activity implements OnClickListener{
// ((TextView)findViewById(R.id.total)).setText("Total de " + total // ((TextView)findViewById(R.id.total)).setText("Total de " + total
// + "point(s)"); // + "point(s)");
// ((Button)findViewById(R.id.jaivu)).setOnClickListener(this); // ((Button)findViewById(R.id.jaivu)).setOnClickListener(this);
>>>>>>> f74dc5006757fe52d362cf1a0d642d01dda7cf43
} }
protected double calculateTotal(){ protected double calculateTotal(){
<<<<<<< HEAD
return this.corrects - this.manquants - this.mauvais;
=======
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
//return this.corrects - this.manquants - this.mauvais; //return this.corrects - this.manquants - this.mauvais;
>>>>>>> f74dc5006757fe52d362cf1a0d642d01dda7cf43
} }
@Override @Override