2023-10-05 23:49:36 +02:00
|
|
|
/*
|
|
|
|
============================================================
|
|
|
|
This is the "Blockzeile" file from Author: Philipp Kotte
|
|
|
|
written on: 05 / 10 / 2023 at: 23:44
|
|
|
|
============================================================
|
|
|
|
*/
|
2023-10-10 21:22:33 +02:00
|
|
|
package Domain.Block;
|
2023-10-05 23:49:36 +02:00
|
|
|
|
|
|
|
public class Blockzeile {
|
2023-10-11 17:29:08 +02:00
|
|
|
|
|
|
|
/*------------------------------------------*/
|
|
|
|
// statische Konstanten
|
|
|
|
/*------------------------------------------*/
|
|
|
|
|
|
|
|
/*------------------------------------------*/
|
|
|
|
// statische Attribute(zB. zähler)
|
|
|
|
/*------------------------------------------*/
|
|
|
|
|
|
|
|
/*------------------------------------------*/
|
|
|
|
// Attribute jedes Objektes
|
|
|
|
/*------------------------------------------*/
|
|
|
|
|
2023-10-10 21:13:21 +02:00
|
|
|
private int rundenNummer;
|
|
|
|
private Blockeintrag[] eintraege;
|
2023-10-05 23:49:36 +02:00
|
|
|
|
2023-10-11 17:29:08 +02:00
|
|
|
/*------------------------------------------*/
|
|
|
|
// Konstruktoren (default und spezifische)
|
|
|
|
/*------------------------------------------*/
|
|
|
|
|
2023-10-10 21:13:21 +02:00
|
|
|
public Blockzeile(int rundenNummer, int spielerAnzahl) {
|
2023-10-05 23:49:36 +02:00
|
|
|
this.rundenNummer = rundenNummer;
|
2023-10-10 21:13:21 +02:00
|
|
|
this.eintraege = new Blockeintrag[spielerAnzahl];
|
2023-10-05 23:49:36 +02:00
|
|
|
}
|
|
|
|
|
2023-10-11 17:29:08 +02:00
|
|
|
/*------------------------------------------*/
|
|
|
|
// statische Methoden
|
|
|
|
/*------------------------------------------*/
|
|
|
|
|
|
|
|
/*------------------------------------------*/
|
|
|
|
// Getter und Setter
|
|
|
|
/*------------------------------------------*/
|
|
|
|
|
|
|
|
/*------------------------------------------*/
|
|
|
|
// @Overrides
|
|
|
|
/*------------------------------------------*/
|
|
|
|
|
|
|
|
/*------------------------------------------*/
|
|
|
|
// öffentliche Methodes
|
|
|
|
/*------------------------------------------*/
|
|
|
|
|
2023-10-05 23:49:36 +02:00
|
|
|
public void addEintrag(Blockeintrag be) {
|
2023-10-10 21:13:21 +02:00
|
|
|
|
|
|
|
for (int i = 0; i < eintraege.length; i++) {
|
|
|
|
if (eintraege[i] == null) {
|
|
|
|
eintraege[i] = be;
|
|
|
|
}
|
|
|
|
}
|
2023-10-11 17:29:08 +02:00
|
|
|
}
|
2023-10-05 23:49:36 +02:00
|
|
|
|
|
|
|
public Blockeintrag[] getDaten() {
|
2023-10-10 21:13:21 +02:00
|
|
|
return eintraege;
|
2023-10-05 23:49:36 +02:00
|
|
|
}
|
|
|
|
|
2023-10-11 17:29:08 +02:00
|
|
|
/*------------------------------------------*/
|
|
|
|
// Hilfsmethoden (privat)
|
|
|
|
/*------------------------------------------*/
|
|
|
|
|
2023-10-05 23:49:36 +02:00
|
|
|
}
|