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;
|
import java.util.Objects;
|
||||||
|
|
||||||
class Blockeintrag {
|
public class Blockeintrag {
|
||||||
private int punkte;
|
private int punkte;
|
||||||
private int stiche;
|
private int stiche;
|
||||||
private Spieler id;
|
private Spieler id;
|
||||||
|
|
|
@ -8,7 +8,7 @@ package Domain.Block;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
class Blockzeile {
|
public class Blockzeile {
|
||||||
|
|
||||||
/*------------------------------------------*/
|
/*------------------------------------------*/
|
||||||
// statische Konstanten
|
// statische Konstanten
|
||||||
|
|
|
@ -47,23 +47,15 @@ public class Stich {
|
||||||
this.spielerID = new int[spielerAnzahl];
|
this.spielerID = new int[spielerAnzahl];
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getSpielerAnzahl(){
|
|
||||||
return spielerID.length;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Karte[] getKarten() {
|
public Karte[] getKarten() {
|
||||||
return this.karten;
|
return this.karten;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addKarte(int spielerID, Karte karte) {
|
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.karten[kartenCount] = karte;
|
||||||
this.spielerID[kartenCount] = spielerID;
|
this.spielerID[kartenCount] = spielerID;
|
||||||
kartenCount++;
|
kartenCount++;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/*------------------------------------------*/
|
/*------------------------------------------*/
|
||||||
// @Overrides
|
// @Overrides
|
||||||
|
@ -75,6 +67,7 @@ public class Stich {
|
||||||
for (int i = 0; i < this.karten.length; i++) {
|
for (int i = 0; i < this.karten.length; i++) {
|
||||||
text += this.karten[i].toString();
|
text += this.karten[i].toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ This is the "BlockTest" file from Author: Philipp Kotte
|
||||||
written on: 10 / 10 / 2023 at: 21:17
|
written on: 10 / 10 / 2023 at: 21:17
|
||||||
============================================================
|
============================================================
|
||||||
*/
|
*/
|
||||||
package Domain.Block;
|
package Test.Domain.Block;
|
||||||
|
|
||||||
import Domain.Block.Block;
|
import Domain.Block.Block;
|
||||||
import Domain.Block.Blockeintrag;
|
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
|
written on: 10 / 10 / 2023 at: 21:17
|
||||||
============================================================
|
============================================================
|
||||||
*/
|
*/
|
||||||
package Domain.Block;
|
package Test.Domain.Block;
|
||||||
|
|
||||||
|
import Domain.Block.Blockeintrag;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import static junit.framework.TestCase.assertEquals;
|
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
|
written on: 10 / 10 / 2023 at: 21:17
|
||||||
============================================================
|
============================================================
|
||||||
*/
|
*/
|
||||||
package Domain.Block;
|
package Test.Domain.Block;
|
||||||
|
|
||||||
import Domain.Block.Block;
|
import Domain.Block.Block;
|
||||||
import Domain.Block.Blockeintrag;
|
import Domain.Block.Blockeintrag;
|
Loading…
Reference in New Issue