Java poker implementation
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AsianFiveCardStud.java 974B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Copyright (c) Chris 'MD87' Smith, 2007. All rights reserved.
  3. *
  4. * This code may not be redistributed without prior permission from the
  5. * aforementioned copyright holder(s).
  6. */
  7. package com.md87.cardgame.games;
  8. import com.md87.cardgame.Card;
  9. import com.md87.cardgame.Rank;
  10. import com.md87.cardgame.Suit;
  11. import java.util.Collections;
  12. /**
  13. *
  14. * @author Chris
  15. */
  16. public class AsianFiveCardStud extends FiveCardStud {
  17. public AsianFiveCardStud(final int numplayers, final int bigblind, final int ante,
  18. final int raises) {
  19. super(numplayers, bigblind, ante, raises);
  20. }
  21. @Override
  22. protected void shuffle() {
  23. deck.clear();
  24. for (Suit suit : Suit.values()) {
  25. for (Rank rank : Rank.values()) {
  26. if (rank.compareTo(Rank.SEVEN) <= 0) {
  27. deck.add(new Card(suit, rank));
  28. }
  29. }
  30. }
  31. Collections.shuffle(deck);
  32. }
  33. }