Compare commits
No commits in common. "iss#6" and "main" have entirely different histories.
|
@ -10,7 +10,7 @@ import Domain.Spieler;
|
|||
|
||||
import java.util.Objects;
|
||||
|
||||
class Blockeintrag {
|
||||
public class Blockeintrag {
|
||||
private int punkte;
|
||||
private int stiche;
|
||||
private Spieler id;
|
||||
|
|
|
@ -8,7 +8,7 @@ package Domain.Block;
|
|||
|
||||
import java.util.ArrayList;
|
||||
|
||||
class Blockzeile {
|
||||
public class Blockzeile {
|
||||
|
||||
/*------------------------------------------*/
|
||||
// statische Konstanten
|
||||
|
|
|
@ -47,22 +47,14 @@ public class Stich {
|
|||
this.spielerID = new int[spielerAnzahl];
|
||||
}
|
||||
|
||||
public int getSpielerAnzahl(){
|
||||
return spielerID.length;
|
||||
}
|
||||
|
||||
public Karte[] getKarten() {
|
||||
return this.karten;
|
||||
}
|
||||
|
||||
public void addKarte(int spielerID, Karte karte) {
|
||||
if (kartenCount > getSpielerAnzahl()){
|
||||
throw new IndexOutOfBoundsException("Karten-Index überschreitet die Anzahl der Spieler");
|
||||
}else {
|
||||
this.karten[kartenCount] = karte;
|
||||
this.spielerID[kartenCount] = spielerID;
|
||||
kartenCount++;
|
||||
}
|
||||
this.karten[kartenCount] = karte;
|
||||
this.spielerID[kartenCount] = spielerID;
|
||||
kartenCount++;
|
||||
}
|
||||
|
||||
/*------------------------------------------*/
|
||||
|
@ -75,6 +67,7 @@ public class Stich {
|
|||
for (int i = 0; i < this.karten.length; i++) {
|
||||
text += this.karten[i].toString();
|
||||
}
|
||||
|
||||
return text;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ This is the "BlockTest" file from Author: Philipp Kotte
|
|||
written on: 10 / 10 / 2023 at: 21:17
|
||||
============================================================
|
||||
*/
|
||||
package Domain.Block;
|
||||
package Test.Domain.Block;
|
||||
|
||||
import Domain.Block.Block;
|
||||
import Domain.Block.Blockeintrag;
|
|
@ -4,8 +4,9 @@ This is the "BlockeintragTest" file from Author: Philipp Kotte
|
|||
written on: 10 / 10 / 2023 at: 21:17
|
||||
============================================================
|
||||
*/
|
||||
package Domain.Block;
|
||||
package Test.Domain.Block;
|
||||
|
||||
import Domain.Block.Blockeintrag;
|
||||
import org.junit.Test;
|
||||
|
||||
import static junit.framework.TestCase.assertEquals;
|
|
@ -4,7 +4,7 @@ This is the "BlockzeileTest" file from Author: Philipp Kotte
|
|||
written on: 10 / 10 / 2023 at: 21:17
|
||||
============================================================
|
||||
*/
|
||||
package Domain.Block;
|
||||
package Test.Domain.Block;
|
||||
|
||||
import Domain.Block.Block;
|
||||
import Domain.Block.Blockeintrag;
|
Loading…
Reference in New Issue