com.gbayer.basicblackjack.ui
Interface UI

All Known Implementing Classes:
ConsoleUI

public interface UI

An abstraction of the BasicBlackJack user interface.


Method Summary
 void dealerWinsRound()
          Update UI to indicate that player wins the round
 void endRound()
          Update UI to indicate that the hand has ended.
 void exitMsg()
          Exit msg.
 Player.Action getUserActionChoice()
          Get user to choose an action.
 java.lang.String getUserInput()
          Gets the user's input.
 void introMsg()
          Intro msg.
 void playerActionTaken(Player player, Player.Action action)
          Update UI to indicate the action that was taken.
 void playerStatus(Player currentPlayer)
          Update status of players hand.
 void playerStatusWithCoveredCards(Player currentPlayer)
          Update status of players hand.
 void playerWinsRound()
          Update UI to indicate that player wins the round.
 void quitMessage()
          Quit message.
 void roundIsPush()
          Update UI to indicate that the round is a push.
 void takeBet(HumanPlayer currentPlayer)
          Get user to place a bet.
 

Method Detail

takeBet

void takeBet(HumanPlayer currentPlayer)
             throws GameQuitException
Get user to place a bet.

Parameters:
currentPlayer - the current player
Throws:
GameQuitException - the game quit exception

getUserInput

java.lang.String getUserInput()
Gets the user's input.

Returns:
the user input

playerStatus

void playerStatus(Player currentPlayer)
Update status of players hand.

Parameters:
currentPlayer - the current player

playerStatusWithCoveredCards

void playerStatusWithCoveredCards(Player currentPlayer)
Update status of players hand. Keep all but the first card covered.

Parameters:
currentPlayer - the current player

getUserActionChoice

Player.Action getUserActionChoice()
Get user to choose an action.

Returns:
the user action choice

playerWinsRound

void playerWinsRound()
Update UI to indicate that player wins the round.


dealerWinsRound

void dealerWinsRound()
Update UI to indicate that player wins the round


roundIsPush

void roundIsPush()
Update UI to indicate that the round is a push.


playerActionTaken

void playerActionTaken(Player player,
                       Player.Action action)
Update UI to indicate the action that was taken.

Parameters:
player - the player
action - the action

endRound

void endRound()
Update UI to indicate that the hand has ended.


quitMessage

void quitMessage()
Quit message.


introMsg

void introMsg()
Intro msg.


exitMsg

void exitMsg()
Exit msg.