38 lines
742 B
Java
38 lines
742 B
Java
package it.polimi.ingsw.gc14.Model;
|
|
|
|
public class Slot {
|
|
// Getters
|
|
private int NUpper;
|
|
public int getNUpper(){
|
|
return NUpper;
|
|
}
|
|
|
|
private int NLower;
|
|
public int getNLower(){
|
|
return NLower;
|
|
}
|
|
|
|
private int Food;
|
|
public int getFood(){
|
|
return Food;
|
|
}
|
|
// End getters
|
|
|
|
// Setters
|
|
// End setters
|
|
|
|
// Constructors
|
|
public Slot(int NUpper, int NLower, int Food) throws IllegalArgumentException {
|
|
this.NUpper = NUpper;
|
|
this.NLower = NLower;
|
|
this.Food = Food;
|
|
if(Food != 0 && (NUpper != 0 || NLower != 0)){
|
|
throw new IllegalArgumentException();
|
|
}
|
|
}
|
|
// End Constructors
|
|
|
|
// Functions
|
|
// End functions
|
|
}
|