-
Notifications
You must be signed in to change notification settings - Fork 0
/
PlayPoker.java
34 lines (29 loc) · 1.04 KB
/
PlayPoker.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import java.util.Arrays;
/**
Alan Tan
7.2.16
This class will simulate a Poker game
*/
public class PlayPoker {
public static void main(String[] args) throws Exception {
PlayingDeck deck = new PlayingDeck();
//deck.shuffle();
PokerPlayer Alan = new PokerPlayer(500);
Alan.addCard(deck.draw());
Alan.addCard(deck.draw());
System.out.println("Alan's cards are " + Alan);
System.out.println("Cards up to river: ");
System.out.println(deck.draw() + ", " + deck.draw() +
", " + deck.draw() + ", " + deck.draw() + ", " +
deck.draw());
Alan.addCard(deck.draw());
Alan.addCard(deck.draw());
Alan.addCard(deck.draw());
PlayingCard[] myDeck = new PlayingCard[5];
for (int i = 0; i < 5; i++) {
myDeck[i] = Alan.hand.get(i);
}
//System.out.println(Arrays.toString(myDeck));
System.out.println("Alan's best hand: " + HandEvaluator.evaluate(myDeck));
}
}