Advertisement
Guest User

Player.java

a guest
Dec 20th, 2014
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.74 KB | None | 0 0
  1. package game;
  2.  
  3. import java.util.ArrayList;
  4.  
  5. /**
  6.  *
  7.  * @author Jesper Nee
  8.  * This class is the template for the Player object
  9.  * Start with 100 "money"
  10.  */
  11.  
  12. public class Player {
  13.     private String name = null;
  14.     private int money = 0;
  15.     private int bet = 0;
  16.     ArrayList<String> playerHand = new ArrayList<String>();
  17.  
  18.     public Player(String _name) {
  19.         name = _name;
  20.         money = 100;
  21.  
  22.     }
  23.  
  24.     public String getName() {
  25.         return name;
  26.     }
  27.  
  28.     public void setName(String name) {
  29.         this.name = name;
  30.     }
  31.  
  32.     public int getMoney() {
  33.         return money;
  34.     }
  35.  
  36.     public void setMoney(int money) {
  37.         this.money = money;
  38.     }
  39.  
  40.     public int getBet() {
  41.         return bet;
  42.     }
  43.  
  44.     public void setBet(int bet) {
  45.         this.bet = bet;
  46.     }
  47.  
  48.     public String toString() {
  49.         return name + " " + playerHand;
  50.  
  51.     }
  52.  
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement