package it.polimi.ingsw.gc14.Model;

public class Slot {
    // Getters
    private char slotId;
    public char getSlotId() {
        return slotId;
    }
    private int NUpper;
    public int getNUpper(){
        return NUpper;
    }
    private int nMinPlayer;
    public int getNMinPlayer()
    {
        return nMinPlayer;
    }
    private int NLower;
    public int getNLower(){
        return NLower;
    }

    private int Food;
    public int getFood(){
        return Food;
    }
    // End getters

    // Setters
    // End setters
    // Constructors
    public Slot(char slotId) throws IllegalArgumentException
    {
        this.slotId = slotId;
        this.nMinPlayer=0;
        switch(slotId)
        {
            case 'A':
                this.Food = 3;
                this.NLower = 0;
                this.NUpper = 0;
                this.nMinPlayer=5;
                break;
            case 'B':
                this.Food = 0;
                this.NLower = 1;
                this.NUpper = 0;
                break;
            case 'C':
                this.Food = 0;
                this.NLower = 0;
                this.NUpper = 1;
                break;
            case 'D':
                this.Food = 0;
                this.NLower = 2;
                this.NUpper = 0;
                this.nMinPlayer = 3;
                break;
            case 'E':
                this.Food = 0;
                this.NLower = 1;
                this.NUpper = 1;
                break;
            case 'F':
                this.Food = 0;
                this.NLower = 0;
                this.NUpper = 2;
                break;
            case 'G':
                this.Food = 0;
                this.NLower = 1;
                this.NUpper = 2;
                this.nMinPlayer = 4;
                break;
            default:
                throw new IllegalArgumentException();
        }
    }

    @Override
    public String toString() {
        return ("SlotID: "+this.getSlotId()+"\nNUpper: "+this.getNUpper()+"\nNLower: "+this.getNLower()+"\nFood: "+this.getFood()+"\nNMinPlayer: "+this.getNMinPlayer()+"\n");
    }
    // End Constructors

    // Functions
    // End functions
}
