Commit 5c630375 authored by Felix RABADAN's avatar Felix RABADAN
Browse files

ajout d'héritage sur User

parent 3cbbdccd
*.class
\ No newline at end of file
*.class
.vscode/launch.json
package game;
public class Admin extends Member{
public Admin(String name) {
super(name);
}
}
......@@ -2,11 +2,8 @@ package game;
import game.controllers.*;
<<<<<<< HEAD
=======
import java.io.FileNotFoundException;
>>>>>>> 516ce458b2b6d48772710f66eccae34c13a74a5e
import game.Player.Position;
public class Game {
......
package game;
public class Member {
protected String name;
public Member(String name) {
this.name = name;
}
public String getName() {
return this.name;
}
}
......@@ -2,14 +2,13 @@ package game;
import java.util.ArrayList;
public class User {
private String name;
public class User extends Member{
private int balance;
private ArrayList<Card> deck;
private Card[] team;
public User(String name) {
this.name = name;
super(name);
this.balance = 10000;
this.deck = new ArrayList<Card>();
this.team = new Card[4];
......@@ -22,10 +21,6 @@ public class User {
}
}
public String getName() {
return this.name;
}
public void getBalance() {
System.out.println("Your balance is " + balance + " coins");
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment