2023-10-05 23:49:36 +02:00
|
|
|
/*
|
|
|
|
============================================================
|
|
|
|
This is the "Kartenstapel" file from Author: Philipp Kotte
|
|
|
|
written on: 05 / 10 / 2023 at: 23:42
|
|
|
|
============================================================
|
|
|
|
*/
|
|
|
|
package Domain;
|
2023-10-11 17:29:08 +02:00
|
|
|
|
2023-10-10 17:34:41 +02:00
|
|
|
import Domain.Karten.*;
|
2023-10-11 17:29:08 +02:00
|
|
|
|
|
|
|
public class Kartenstapel {
|
|
|
|
|
|
|
|
/*------------------------------------------*/
|
|
|
|
// statische Konstanten
|
|
|
|
/*------------------------------------------*/
|
|
|
|
|
|
|
|
/*------------------------------------------*/
|
|
|
|
// statische Attribute(zB. zähler)
|
|
|
|
/*------------------------------------------*/
|
|
|
|
|
|
|
|
/*------------------------------------------*/
|
|
|
|
// Attribute jedes Objektes
|
|
|
|
/*------------------------------------------*/
|
|
|
|
|
2023-10-10 17:34:41 +02:00
|
|
|
private Karte[] kartenStapel = new Karte[60];
|
2023-10-11 17:29:08 +02:00
|
|
|
|
|
|
|
/*------------------------------------------*/
|
|
|
|
// Konstruktoren (default und spezifische)
|
|
|
|
/*------------------------------------------*/
|
|
|
|
|
2023-10-10 17:34:41 +02:00
|
|
|
public Kartenstapel() {
|
2023-10-11 17:29:08 +02:00
|
|
|
|
2023-10-10 17:34:41 +02:00
|
|
|
}
|
2023-10-11 17:29:08 +02:00
|
|
|
|
|
|
|
/*------------------------------------------*/
|
|
|
|
// statische Methoden
|
|
|
|
/*------------------------------------------*/
|
|
|
|
|
|
|
|
/*------------------------------------------*/
|
|
|
|
// Getter und Setter
|
|
|
|
/*------------------------------------------*/
|
|
|
|
|
2023-10-10 17:34:41 +02:00
|
|
|
/**
|
|
|
|
* Ausgabe des ersten Elements des Stapels.
|
2023-10-11 17:29:08 +02:00
|
|
|
*
|
2023-10-10 17:34:41 +02:00
|
|
|
* @return erstes Element
|
|
|
|
*/
|
|
|
|
public Karte getObersteKarte() {
|
|
|
|
return kartenStapel[0];
|
|
|
|
}
|
2023-10-11 17:29:08 +02:00
|
|
|
|
2023-10-10 17:34:41 +02:00
|
|
|
/**
|
|
|
|
* Ausgabe der Stapelgroesse.
|
2023-10-11 17:29:08 +02:00
|
|
|
*
|
2023-10-10 17:34:41 +02:00
|
|
|
* @return laenge des Kartenstapels-Arrays
|
|
|
|
*/
|
|
|
|
public int getAnzahlKarten() {
|
|
|
|
return kartenStapel.length;
|
|
|
|
}
|
2023-10-05 23:49:36 +02:00
|
|
|
|
2023-10-11 17:29:08 +02:00
|
|
|
/*------------------------------------------*/
|
|
|
|
// @Overrides
|
|
|
|
/*------------------------------------------*/
|
|
|
|
|
|
|
|
/*------------------------------------------*/
|
|
|
|
// öffentliche Methoden
|
|
|
|
/*------------------------------------------*/
|
|
|
|
|
|
|
|
public void mischen() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/*------------------------------------------*/
|
|
|
|
// Hilfsmethoden (privat)
|
|
|
|
/*------------------------------------------*/
|
|
|
|
|
|
|
|
//
|
|
|
|
|
2023-10-05 23:49:36 +02:00
|
|
|
}
|