ADD Player and Score

master
Mathis 2022-05-17 09:14:16 +02:00
parent b5e8814000
commit a1f81b0d15
2 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,24 @@
package latice.model;
import java.util.Scanner;
public class Player {
private final String name;
private Score score;
public Player(String name, Score score) {
//Demande le nom du joueur
Scanner enterPlayerName = new Scanner(System.in);
System.out.println("Veuilez entrer votre nom " + name + " :");
String namePlayer = enterPlayerName.next();
this.name = namePlayer;
this.score = score;
}
public String getName() {
return name;
}
}

View File

@ -0,0 +1,19 @@
package latice.model;
public class Score {
private Integer score;
public Score() {
this.score = 0;
}
public Integer getScore() {
return score;
}
public void setScore(Integer score) {
this.score = score;
}
}