Correction d'un probleme lors du lancement de l'activite Score
This commit is contained in:
parent
97e18f69ef
commit
546f105223
|
@ -10,7 +10,7 @@ import android.view.View;
|
|||
import android.view.View.OnClickListener;
|
||||
|
||||
public class Score extends Activity implements OnClickListener{
|
||||
private GamePlayed gamePlayed;
|
||||
private GamePlayed gamePlayed;
|
||||
|
||||
|
||||
@Override
|
||||
|
|
|
@ -23,10 +23,10 @@ import android.widget.Button;
|
|||
import android.widget.TextView;
|
||||
|
||||
public class BaseGame extends Activity implements OnClickListener {
|
||||
private int currentWord = 0;
|
||||
private int nbWord = 0;
|
||||
private Game game;
|
||||
private GamePlayed gamePlayed;
|
||||
private int currentWord = 0;
|
||||
private int nbWord = 0;
|
||||
private Game game;
|
||||
private GamePlayed gamePlayed;
|
||||
|
||||
/** Called when the activity is first created. */
|
||||
@Override
|
||||
|
@ -112,12 +112,12 @@ public class BaseGame extends Activity implements OnClickListener {
|
|||
* Permet de verifier si la partie est fini auquel cas on lance l'activite Score, sinon on passe au mot suivant.
|
||||
*/
|
||||
private void next() {
|
||||
if (currentWord < nbWord) {
|
||||
currentWord++;
|
||||
if (++currentWord < nbWord) {
|
||||
start();
|
||||
} else {
|
||||
Intent intent = new Intent(this, Score.class);
|
||||
intent.putExtra(Constant.SCORE_INTENT, gamePlayed);
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,15 @@
|
|||
package org.pticlic.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class Game {
|
||||
|
||||
public static class Word {
|
||||
public class Game implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public static class Word implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private int id;
|
||||
private String name;
|
||||
|
||||
|
@ -25,13 +31,13 @@ public class Game {
|
|||
this.name = name;
|
||||
}
|
||||
}
|
||||
|
||||
private int id;
|
||||
private int cat1;
|
||||
private int cat2;
|
||||
private int cat3;
|
||||
private int cat4;
|
||||
private Word center;
|
||||
|
||||
private int id;
|
||||
private int cat1;
|
||||
private int cat2;
|
||||
private int cat3;
|
||||
private int cat4;
|
||||
private Word center;
|
||||
private Game.Word[] cloud;
|
||||
|
||||
public Game() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user