mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-31 07:02:27 -08:00
Add Player and Card objects
This commit is contained in:
32
10_Blackjack/java/src/Player.java
Normal file
32
10_Blackjack/java/src/Player.java
Normal file
@@ -0,0 +1,32 @@
|
||||
import Card;
|
||||
|
||||
public class Player {
|
||||
|
||||
private int currentBet;
|
||||
private int total;
|
||||
private LinkedList<Card> hand;
|
||||
|
||||
public void setCurrentBet(int currentBet) {
|
||||
this.currentBet = currentBet;
|
||||
}
|
||||
|
||||
public int getCurrentBet() {
|
||||
return this.currentBet;
|
||||
}
|
||||
|
||||
public void setTotal(int total) {
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
public int getTotal() {
|
||||
return this.total;
|
||||
}
|
||||
|
||||
public void setHand(LinkedList<Card> hand) {
|
||||
this.hand = hand;
|
||||
}
|
||||
|
||||
public LinkedList<Card> getHand() {
|
||||
return this.hand;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user