forked from 2211945/WIZARD_PR2_DOP
76 lines
1.9 KiB
Java
76 lines
1.9 KiB
Java
/*
|
|
============================================================
|
|
This is the "Stich" file from Author: Philipp Kotte
|
|
written on: 11 / 10 / 2023 at: 20:25
|
|
============================================================
|
|
*/
|
|
package Domain;
|
|
|
|
import Domain.Karten.Karte;
|
|
|
|
public class Stich {
|
|
/*------------------------------------------*/
|
|
// statische Konstanten
|
|
/*------------------------------------------*/
|
|
|
|
/*------------------------------------------*/
|
|
// statische Attribute(zB. zähler)
|
|
/*------------------------------------------*/
|
|
|
|
/*------------------------------------------*/
|
|
// Attribute jedes Objektes
|
|
/*------------------------------------------*/
|
|
private Karte[] karten;
|
|
/*------------------------------------------*/
|
|
// Konstruktoren (default und spezifische)
|
|
/*------------------------------------------*/
|
|
|
|
public Stich() {
|
|
|
|
}
|
|
|
|
public Stich(Karte[] karten) {
|
|
setKarten(karten);
|
|
|
|
}
|
|
|
|
/*------------------------------------------*/
|
|
// statische Methoden
|
|
/*------------------------------------------*/
|
|
|
|
/*------------------------------------------*/
|
|
// Getter und Setter
|
|
/*------------------------------------------*/
|
|
|
|
public void setKarten(Karte[] karten) {
|
|
this.karten = karten;
|
|
}
|
|
|
|
public Karte[] getKarten() {
|
|
return this.karten;
|
|
}
|
|
|
|
/*------------------------------------------*/
|
|
// @Overrides
|
|
/*------------------------------------------*/
|
|
|
|
@Override
|
|
public String toString() {
|
|
String text = "";
|
|
for (int i = 0; i < this.karten.length; i++) {
|
|
text += this.karten[i].toString();
|
|
}
|
|
|
|
return text;
|
|
}
|
|
|
|
/*------------------------------------------*/
|
|
// öffentliche Methodes
|
|
/*------------------------------------------*/
|
|
|
|
/*------------------------------------------*/
|
|
// Hilfsmethoden (privat)
|
|
/*------------------------------------------*/
|
|
|
|
}
|