Game initialize
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user