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
|
|
|
|
/*------------------------------------------*/
|
2023-10-18 16:00:16 +02:00
|
|
|
private Kartenfarbe kartenfarbe;
|
2023-10-13 07:58:37 +02:00
|
|
|
private int kartenNummer;
|
|
|
|
|
|
|
|
/*------------------------------------------*/
|
|
|
|
// Konstruktoren (default und spezifische)
|
|
|
|
/*------------------------------------------*/
|
|
|
|
public Zahlenkarte() {
|
|
|
|
super();
|
|
|
|
}
|
|
|
|
|
2023-10-18 16:00:16 +02:00
|
|
|
public Zahlenkarte(Kartenfarbe kartenfarbe, int kartenNummer) {
|
2023-10-13 07:58:37 +02:00
|
|
|
super();
|
2023-10-18 16:00:16 +02:00
|
|
|
setKartenfarbe(kartenfarbe);
|
2023-10-13 07:58:37 +02:00
|
|
|
setKartenNummer(kartenNummer);
|
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
|
|
|
|
/*------------------------------------------*/
|
2023-10-18 16:00:16 +02:00
|
|
|
public void setKartenfarbe(Kartenfarbe kartenfarbe) {
|
|
|
|
this.kartenfarbe = kartenfarbe;
|
2023-10-13 07:58:37 +02:00
|
|
|
}
|
2023-10-11 17:15:09 +02:00
|
|
|
|
2023-10-18 16:00:16 +02:00
|
|
|
public Kartenfarbe getKartenfarbe() {
|
|
|
|
return kartenfarbe;
|
2023-10-13 07:58:37 +02:00
|
|
|
}
|
2023-10-11 17:15:09 +02:00
|
|
|
|
2023-10-13 07:58:37 +02:00
|
|
|
public void setKartenNummer(int kartenNummer) {
|
|
|
|
this.kartenNummer = kartenNummer;
|
|
|
|
}
|
2023-10-11 17:15:09 +02:00
|
|
|
|
2023-10-13 07:58:37 +02:00
|
|
|
public int getKartenNummer() {
|
|
|
|
return kartenNummer;
|
|
|
|
}
|
2023-10-11 17:15:09 +02:00
|
|
|
|
2023-10-13 07:58:37 +02:00
|
|
|
/*------------------------------------------*/
|
|
|
|
// @Overrides
|
|
|
|
/*------------------------------------------*/
|
2023-10-18 16:00:16 +02:00
|
|
|
@Override
|
|
|
|
public String toString() {
|
|
|
|
return "Charakterkarte: " + this.getKartenfarbe().name() + " (" + this.getKartenfarbe() + ").";
|
|
|
|
}
|
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
|
|
|
}
|