Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.List;
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- /**
- *
- * @author lacos
- */
- public abstract class Player {
- private final String name;
- private int money;
- protected boolean lastWon = true;
- protected int stake;
- protected Enum<BetTypes> betType;
- protected boolean isBetting = true;
- public String getName() {
- return name;
- }
- public int getMoney() {
- return money;
- }
- public Player(String name, int money) {
- this.name = name;
- this.money = money;
- }
- public void setMoney(int ods, int stake ){
- money -= stake;
- if(lastWon){
- money += (ods * stake);
- }
- }
- public abstract void nextBet();
- public abstract Enum<Color> getColorBet();
- public abstract List<Integer> getNumberBet();
- public abstract int getStake();
- public void setLastWon(boolean winOrLose){
- lastWon = winOrLose;
- }
- public Enum<BetTypes> getBetType() {
- return betType;
- }
- public boolean isBetting() {
- return isBetting;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement