-footer

garrettsmith.blackjack
Interface Result


public interface Result

Represents the result of one hand that is complete.

Since:
Blackjack v1.0
Version:
Blackjack v1.0
Author:
Garrett Smith, gsmith at northwestern dot edu

Field Summary
static Result BLACKJACK
          Represents when the player has a blackjack.
static Result BLACKJACK_PUSH
          Represents when both the player and the dealer have a blackjack.
static Result BUSTED
          Represents when the player's hand exceeded 21.
static Result DEALER_BLACKJACK
          Represents when the dealer has a blackjack.
static Result DEALER_BUSTED
          Represents when the dealer's hand exceeded 21 and the player's hand is equal to or less than 21.
static Result EARLY_SURRENDER
          Represents when the player surrenders his hand.
static Result LATE_SURRENDER
          Represents when the player surrenders his hand.
static Result LOSE
          Represents when the player has a hand whose value is less than the dealer's and both hands are equal to or less than 21.
static Result PUSH
          Represents when both the player and dealer have the same value hand that is equal to or less than 21.
static Result WIN
          Represents when the player has a hand whose value is greater than the dealer's and both hands are equal to or less than 21.
 
Method Summary
 int value()
          Returns the value of the result used only internally for equality comparison.
 

Field Detail

PUSH

static final Result PUSH
Represents when both the player and dealer have the same value hand that is equal to or less than 21.


WIN

static final Result WIN
Represents when the player has a hand whose value is greater than the dealer's and both hands are equal to or less than 21.


LOSE

static final Result LOSE
Represents when the player has a hand whose value is less than the dealer's and both hands are equal to or less than 21.


LATE_SURRENDER

static final Result LATE_SURRENDER
Represents when the player surrenders his hand.


EARLY_SURRENDER

static final Result EARLY_SURRENDER
Represents when the player surrenders his hand.


DEALER_BLACKJACK

static final Result DEALER_BLACKJACK
Represents when the dealer has a blackjack.


BUSTED

static final Result BUSTED
Represents when the player's hand exceeded 21.


DEALER_BUSTED

static final Result DEALER_BUSTED
Represents when the dealer's hand exceeded 21 and the player's hand is equal to or less than 21.


BLACKJACK

static final Result BLACKJACK
Represents when the player has a blackjack.


BLACKJACK_PUSH

static final Result BLACKJACK_PUSH
Represents when both the player and the dealer have a blackjack.

Method Detail

value

int value()
Returns the value of the result used only internally for equality comparison.


-footer

Copyright 2001-5 Garrett Smith. Use is subject to license terms.