-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPropriete.java
More file actions
51 lines (37 loc) · 1.03 KB
/
Propriete.java
File metadata and controls
51 lines (37 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Modele;
/**
*
* @author chevajer
*/
public abstract class Propriete extends Carreau{
private Joueur proprietaire;
private int prix;
public Propriete(int num, String nom, int p){
super(num, nom);
this.setProprietaire(null);
this.setPrix(p);
}
public Joueur getProprietaire() {
return proprietaire;
}
private void setProprietaire(Joueur proprietaire) {
this.proprietaire = proprietaire;
}
public abstract void acheterPropriete(Joueur joueur);
public void payerLoyer(Joueur payeur, Joueur payé){
payeur.perdreCash(this.getLoyer());
payé.recevoirCash(this.getLoyer());
}
public int getPrix() {
return this.prix;
}
public void setPrix(int p) {
this.prix = p;
}
public abstract int getLoyer();
}