/*_x000D_
 * To change this license header, choose License Headers in Project Properties._x000D_
 * To change this template file, choose Tools | Templates_x000D_
 * and open the template in the editor._x000D_
 */_x000D_
package dominion;_x000D_
_x000D_
import dominion.Database.DatabaseService;_x000D_
import dominion.Models.*;_x000D_
_x000D_
public class Speler {_x000D_
    private String name;_x000D_
    private int playerID;_x000D_
    private Deck drawDeck;_x000D_
    private Deck handDeck;_x000D_
    private Deck discardDeck;_x000D_
    private int actions;_x000D_
    private int buys;_x000D_
    private int coins;_x000D_
    private int victoryPoints;_x000D_
    private boolean effected;_x000D_
    _x000D_
    //constructor_x000D_
    public Speler(String name, int ID, DatabaseService dbs){_x000D_
        this.name = name;_x000D_
        this.playerID = ID;_x000D_
        newDecks(dbs);_x000D_
//        initRound();_x000D_
    }_x000D_
    _x000D_
    private void newDecks(DatabaseService dbs){_x000D_
        drawDeck = new Deck(true, dbs);_x000D_
        handDeck = new Deck(false, dbs);_x000D_
        discardDeck = new Deck(false, dbs);_x000D_
    }_x000D_
    _x000D_
    public void initRound(){_x000D_
        actions = 1;_x000D_
        buys = 1;_x000D_
        coins = 0;_x000D_
    }_x000D_
    _x000D_
    public void setEffected(boolean b){_x000D_
        effected = b;_x000D_
    }_x000D_
    _x000D_
    //actie verminderen per actiekaart gespeeld_x000D_
    public void actionDecrement(int actionDecrease){_x000D_
        this.actions -= actionDecrease;_x000D_
    }_x000D_
    _x000D_
    //naargelang de kaart actie terug vermeerderen_x000D_
    public void actionIncrement(int actionIncrease){_x000D_
        this.actions += actionIncrease;_x000D_
    }_x000D_
    _x000D_
    //na aankoop kaart buy verminderen_x000D_
    public void buysDecrement(int buysDecrease){_x000D_
        this.buys -= buysDecrease;_x000D_
    }_x000D_
    _x000D_
    public void buysIncrement(int buysIncrease){_x000D_
        this.buys += buysIncrease;_x000D_
    }_x000D_
    _x000D_
    //na aankoop muntkaarten coins verhogen_x000D_
    public void coinsIncrement(int coinsIncrease){_x000D_
        this.coins += coinsIncrease;_x000D_
    }_x000D_
    _x000D_
    //na aankoop muntkaarten coins verlagen_x000D_
    public void coinsDecrement(int coinsDecrease){_x000D_
        this.coins -= coinsDecrease;_x000D_
    }_x000D_
    _x000D_
    public void setVictoryPoints(int amount){_x000D_
        this.victoryPoints = amount;_x000D_
    }_x000D_
_x000D_
    public boolean isEffected() {_x000D_
        return effected;_x000D_
    }_x000D_
    public String getPlayerName() {_x000D_
        return name;_x000D_
    }_x000D_
    public int getPlayerID() {_x000D_
        return playerID;_x000D_
    }_x000D_
    public int getActions() {_x000D_
        return actions;_x000D_
    }_x000D_
    public int getBuys() {_x000D_
        return buys;_x000D_
    }_x000D_
    public int getCoins() {_x000D_
        return coins;_x000D_
    }_x000D_
    public int getVictoryPoints(){_x000D_
        return victoryPoints;_x000D_
    }_x000D_
    public Deck getHandDeck(){_x000D_
        return handDeck;_x000D_
    }_x000D_
    public Deck getDiscardDeck(){_x000D_
        return discardDeck;_x000D_
    }_x000D_
    public Deck getDrawDeck(){_x000D_
        return drawDeck;_x000D_
    }_x000D_
    _x000D_
}
//na aankoop muntkaarten coins verlagen_x000D_
/*_x000D_
 * To change this license header, choose License Headers in Project Properties._x000D_
 * To change this template file, choose Tools | Templates_x000D_
 * and open the template in the editor._x000D_
 */_x000D_
package dominion;_x000D_
_x000D_
import dominion.Database.DatabaseService;_x000D_
import dominion.Models.*;_x000D_
_x000D_
public class Speler {_x000D_
    private String name;_x000D_
    private int playerID;_x000D_
    private Deck drawDeck;_x000D_
    private Deck handDeck;_x000D_
    private Deck discardDeck;_x000D_
    private int actions;_x000D_
    private int buys;_x000D_
    private int coins;_x000D_
    private int victoryPoints;_x000D_
    private boolean effected;_x000D_
    _x000D_
    //constructor_x000D_
    public Speler(String name, int ID, DatabaseService dbs){_x000D_
        this.name = name;_x000D_
        this.playerID = ID;_x000D_
        newDecks(dbs);_x000D_
//        initRound();_x000D_
    }_x000D_
    _x000D_
    private void newDecks(DatabaseService dbs){_x000D_
        drawDeck = new Deck(true, dbs);_x000D_
        handDeck = new Deck(false, dbs);_x000D_
        discardDeck = new Deck(false, dbs);_x000D_
    }_x000D_
    _x000D_
    public void initRound(){_x000D_
        actions = 1;_x000D_
        buys = 1;_x000D_
        coins = 0;_x000D_
    }_x000D_
    _x000D_
    public void setEffected(boolean b){_x000D_
        effected = b;_x000D_
    }_x000D_
    _x000D_
    //actie verminderen per actiekaart gespeeld_x000D_
    public void actionDecrement(int actionDecrease){_x000D_
        this.actions -= actionDecrease;_x000D_
    }_x000D_
    _x000D_
    //naargelang de kaart actie terug vermeerderen_x000D_
    public void actionIncrement(int actionIncrease){_x000D_
        this.actions += actionIncrease;_x000D_
    }_x000D_
    _x000D_
    //na aankoop kaart buy verminderen_x000D_
    public void buysDecrement(int buysDecrease){_x000D_
        this.buys -= buysDecrease;_x000D_
    }_x000D_
    _x000D_
    public void buysIncrement(int buysIncrease){_x000D_
        this.buys += buysIncrease;_x000D_
    }_x000D_
    _x000D_
    //na aankoop muntkaarten coins verhogen_x000D_
    public void coinsIncrement(int coinsIncrease){_x000D_
        this.coins += coinsIncrease;_x000D_
    }_x000D_
    _x000D_
    //na aankoop<SUF>
    public void coinsDecrement(int coinsDecrease){_x000D_
        this.coins -= coinsDecrease;_x000D_
    }_x000D_
    _x000D_
    public void setVictoryPoints(int amount){_x000D_
        this.victoryPoints = amount;_x000D_
    }_x000D_
_x000D_
    public boolean isEffected() {_x000D_
        return effected;_x000D_
    }_x000D_
    public String getPlayerName() {_x000D_
        return name;_x000D_
    }_x000D_
    public int getPlayerID() {_x000D_
        return playerID;_x000D_
    }_x000D_
    public int getActions() {_x000D_
        return actions;_x000D_
    }_x000D_
    public int getBuys() {_x000D_
        return buys;_x000D_
    }_x000D_
    public int getCoins() {_x000D_
        return coins;_x000D_
    }_x000D_
    public int getVictoryPoints(){_x000D_
        return victoryPoints;_x000D_
    }_x000D_
    public Deck getHandDeck(){_x000D_
        return handDeck;_x000D_
    }_x000D_
    public Deck getDiscardDeck(){_x000D_
        return discardDeck;_x000D_
    }_x000D_
    public Deck getDrawDeck(){_x000D_
        return drawDeck;_x000D_
    }_x000D_
    _x000D_
}