Advertisement
Guest User

Untitled

a guest
Dec 17th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1.  
  2. import java.util.List;
  3.  
  4. /*
  5. * To change this license header, choose License Headers in Project Properties.
  6. * To change this template file, choose Tools | Templates
  7. * and open the template in the editor.
  8. */
  9.  
  10. /**
  11. *
  12. * @author lacos
  13. */
  14. public abstract class Player {
  15.  
  16. private final String name;
  17. private int money;
  18. protected boolean lastWon = true;
  19. protected int stake;
  20. protected Enum<BetTypes> betType;
  21. protected boolean isBetting = true;
  22.  
  23. public String getName() {
  24. return name;
  25. }
  26.  
  27. public int getMoney() {
  28. return money;
  29. }
  30.  
  31. public Player(String name, int money) {
  32. this.name = name;
  33. this.money = money;
  34. }
  35.  
  36. public void setMoney(int ods, int stake ){
  37. money -= stake;
  38. if(lastWon){
  39. money += (ods * stake);
  40. }
  41. }
  42.  
  43. public abstract void nextBet();
  44. public abstract Enum<Color> getColorBet();
  45. public abstract List<Integer> getNumberBet();
  46. public abstract int getStake();
  47.  
  48. public void setLastWon(boolean winOrLose){
  49. lastWon = winOrLose;
  50. }
  51.  
  52. public Enum<BetTypes> getBetType() {
  53. return betType;
  54. }
  55.  
  56. public boolean isBetting() {
  57. return isBetting;
  58. }
  59.  
  60. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement