2023-10-05 23:49:36 +02:00
|
|
|
/*
|
|
|
|
============================================================
|
|
|
|
This is the "Zahlenkarte" file from Author: Philipp Kotte
|
|
|
|
written on: 05 / 10 / 2023 at: 23:30
|
|
|
|
============================================================
|
|
|
|
*/
|
|
|
|
package Domain.Karten;
|
|
|
|
|
2023-10-13 07:58:37 +02:00
|
|
|
import Domain.Enums.Kartenfarbe;
|
|
|
|
|
2023-10-05 23:49:36 +02:00
|
|
|
public class Zahlenkarte extends Karte {
|
|
|
|
|
2023-10-13 07:58:37 +02:00
|
|
|
/*------------------------------------------*/
|
|
|
|
// statische Konstanten
|
|
|
|
/*------------------------------------------*/
|
|
|
|
|
|
|
|
/*------------------------------------------*/
|
|
|
|
// statische Attribute(zB. zähler)
|
|
|
|
/*------------------------------------------*/
|
|
|
|
|
|
|
|
/*------------------------------------------*/
|
|
|
|
// Attribute jedes Objektes
|
|
|
|
/*------------------------------------------*/
|
|
|
|
private Kartenfarbe farbe;
|
2023-10-20 08:52:29 +02:00
|
|
|
private int wert;
|
2023-10-13 07:58:37 +02:00
|
|
|
|
|
|
|
/*------------------------------------------*/
|
|
|
|
// Konstruktoren (default und spezifische)
|
|
|
|
/*------------------------------------------*/
|
|
|
|
public Zahlenkarte() {
|
|
|
|
super();
|
|
|
|
}
|
|
|
|
|
2023-10-20 08:52:29 +02:00
|
|
|
public Zahlenkarte(Kartenfarbe farbe, int wert) {
|
2023-10-13 07:58:37 +02:00
|
|
|
super();
|
|
|
|
setFarbe(farbe);
|
2023-10-20 08:52:29 +02:00
|
|
|
setWert(wert);
|
2023-10-11 17:15:09 +02:00
|
|
|
|
2023-10-13 07:58:37 +02:00
|
|
|
}
|
|
|
|
/*------------------------------------------*/
|
|
|
|
// statische Methoden
|
|
|
|
/*------------------------------------------*/
|
2023-10-11 17:15:09 +02:00
|
|
|
|
2023-10-13 07:58:37 +02:00
|
|
|
/*------------------------------------------*/
|
|
|
|
// Getter und Setter
|
|
|
|
/*------------------------------------------*/
|
|
|
|
public void setFarbe(Kartenfarbe farbe) {
|
|
|
|
this.farbe = farbe;
|
|
|
|
}
|
2023-10-11 17:15:09 +02:00
|
|
|
|
2023-10-13 07:58:37 +02:00
|
|
|
public Kartenfarbe getFarbe() {
|
|
|
|
return farbe;
|
|
|
|
}
|
2023-10-11 17:15:09 +02:00
|
|
|
|
2023-10-20 08:52:29 +02:00
|
|
|
public void setWert(int kartenNummer) {
|
|
|
|
this.wert = kartenNummer;
|
2023-10-13 07:58:37 +02:00
|
|
|
}
|
2023-10-11 17:15:09 +02:00
|
|
|
|
2023-10-20 08:52:29 +02:00
|
|
|
public int getWert() {
|
|
|
|
return wert;
|
2023-10-13 07:58:37 +02:00
|
|
|
}
|
2023-10-11 17:15:09 +02:00
|
|
|
|
2023-10-13 07:58:37 +02:00
|
|
|
/*------------------------------------------*/
|
|
|
|
// @Overrides
|
|
|
|
/*------------------------------------------*/
|
2023-10-11 17:15:09 +02:00
|
|
|
|
2023-10-13 07:58:37 +02:00
|
|
|
/*------------------------------------------*/
|
|
|
|
// öffentliche Methodes
|
|
|
|
/*------------------------------------------*/
|
2023-10-11 17:15:09 +02:00
|
|
|
|
2023-10-13 07:58:37 +02:00
|
|
|
/*------------------------------------------*/
|
|
|
|
// Hilfsmethoden (privat)
|
|
|
|
/*------------------------------------------*/
|
2023-10-11 17:15:09 +02:00
|
|
|
|
2023-10-05 23:49:36 +02:00
|
|
|
}
|