Game initialize

This commit is contained in:
rubenpirreram
2026-03-19 16:54:13 +01:00
parent 1f3d22768b
commit 5e6173e730
8 changed files with 48 additions and 21 deletions
@@ -6,7 +6,11 @@ public class Slot {
public int getNUpper(){
return NUpper;
}
private int nMinPlayer;
public int getNMinPlayer()
{
return nMinPlayer;
}
private int NLower;
public int getNLower(){
return NLower;
@@ -22,13 +26,14 @@ public class Slot {
// End setters
// Constructors
public Slot(int NUpper, int NLower, int Food) throws IllegalArgumentException {
public Slot(int NUpper, int NLower, int Food,int nMinPlayer) throws IllegalArgumentException {
this.NUpper = NUpper;
this.NLower = NLower;
this.Food = Food;
if(Food != 0 && (NUpper != 0 || NLower != 0)){
throw new IllegalArgumentException();
}
this.nMinPlayer = nMinPlayer;
}
// End Constructors