forked from 2211945/WIZARD_PR2_DOP
31 lines
578 B
Java
31 lines
578 B
Java
/*
|
|
============================================================
|
|
This is the "Karte" file from Author: Philipp Kotte
|
|
written on: 05 / 10 / 2023 at: 23:28
|
|
============================================================
|
|
*/
|
|
package Domain.Karten;
|
|
|
|
public abstract class Karte {
|
|
|
|
private static int kartenId = 0;
|
|
|
|
public Karte() {
|
|
if (kartenId <= 60) {
|
|
setKartenId();
|
|
}
|
|
else {
|
|
throw new RuntimeException("Es darf nur 60 Karten im Spiel geben.");
|
|
}
|
|
}
|
|
|
|
public static int getKartenId() {
|
|
return kartenId;
|
|
}
|
|
|
|
public static void setKartenId() {
|
|
kartenId++;
|
|
}
|
|
|
|
}
|