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