com.bolinfest.prisonerbot
Interface Manager

All Known Implementing Classes:
DaimManager, DefaultManager, SmackManager

public interface Manager

Manager is the brains of the PrisonerBot operation. All requests start with Manager and are delegated to the appropriate classes. A manager is expected to understand the following messages:

Author:
mbolin

Field Summary
static String ASK_NUM_ROUNDS_MESSAGE
           
static String ASK_TO_PLAY_AGAIN_MESSAGE
           
static String ASK_TO_PLAY_MESSAGE
           
static String CHOICE_ALREADY_ENTERED_MESSAGE
           
static String CONFUSED_MESSAGE
           
static String DOES_NOT_WANT_TO_PLAY_MESSAGE
           
static String FINDING_AN_OPPONENT_MESSAGE
           
static String FOUND_OPPONENT_MESSAGE
           
static String HELP_MESSAGE
           
static Pattern HTML_PATTERN
           
static String INTRODUCTORY_MESSAGE
          this includes the ASK_TO_PLAY_MESSAGE
static int MAX_ROUNDS
          the maximum number of rounds to request, inclusive
static String MESSAGE_FROM_OPPONENT_DISCLAIMER
           
static int MIN_ROUNDS
          the minimum number of rounds to request, inclusive
static String NUM_ROUNDS_BOUNDS_ERROR_MESSAGE
           
static String NUM_ROUNDS_ENTERED_MESSAGE
           
static String NUM_ROUNDS_NAN_ERROR_MESSAGE
           
static String WAITING_FOR_OPPONENT_CHOICE_MESSAGE
           
 
Method Summary
 int getBuddyCount()
           
 int getBuddyStatus(String buddyName)
           
 UnmodifiableGame getGame(String buddyName)
          Get an unmodifiable view of the game in which the buddy with this name is involved.
 GameLogger getLogger()
           
 void handleMessage(String sender, String message)
           
 boolean hasBuddy(String buddyName)
           
 boolean isOpponentAvailable()
           
 void removeAllBuddies()
           
 void setLogger(GameLogger logger)
           
 

Field Detail

MIN_ROUNDS

static final int MIN_ROUNDS
the minimum number of rounds to request, inclusive

See Also:
Constant Field Values

MAX_ROUNDS

static final int MAX_ROUNDS
the maximum number of rounds to request, inclusive

See Also:
Constant Field Values

HELP_MESSAGE

static final String HELP_MESSAGE
See Also:
Constant Field Values

CONFUSED_MESSAGE

static final String CONFUSED_MESSAGE
See Also:
Constant Field Values

ASK_TO_PLAY_MESSAGE

static final String ASK_TO_PLAY_MESSAGE
See Also:
Constant Field Values

ASK_TO_PLAY_AGAIN_MESSAGE

static final String ASK_TO_PLAY_AGAIN_MESSAGE
See Also:
Constant Field Values

INTRODUCTORY_MESSAGE

static final String INTRODUCTORY_MESSAGE
this includes the ASK_TO_PLAY_MESSAGE

See Also:
Constant Field Values

DOES_NOT_WANT_TO_PLAY_MESSAGE

static final String DOES_NOT_WANT_TO_PLAY_MESSAGE
See Also:
Constant Field Values

FINDING_AN_OPPONENT_MESSAGE

static final String FINDING_AN_OPPONENT_MESSAGE
See Also:
Constant Field Values

FOUND_OPPONENT_MESSAGE

static final String FOUND_OPPONENT_MESSAGE
See Also:
Constant Field Values

ASK_NUM_ROUNDS_MESSAGE

static final String ASK_NUM_ROUNDS_MESSAGE
See Also:
Constant Field Values

NUM_ROUNDS_NAN_ERROR_MESSAGE

static final String NUM_ROUNDS_NAN_ERROR_MESSAGE
See Also:
Constant Field Values

NUM_ROUNDS_BOUNDS_ERROR_MESSAGE

static final String NUM_ROUNDS_BOUNDS_ERROR_MESSAGE
See Also:
Constant Field Values

NUM_ROUNDS_ENTERED_MESSAGE

static final String NUM_ROUNDS_ENTERED_MESSAGE
See Also:
Constant Field Values

WAITING_FOR_OPPONENT_CHOICE_MESSAGE

static final String WAITING_FOR_OPPONENT_CHOICE_MESSAGE
See Also:
Constant Field Values

CHOICE_ALREADY_ENTERED_MESSAGE

static final String CHOICE_ALREADY_ENTERED_MESSAGE
See Also:
Constant Field Values

MESSAGE_FROM_OPPONENT_DISCLAIMER

static final String MESSAGE_FROM_OPPONENT_DISCLAIMER
See Also:
Constant Field Values

HTML_PATTERN

static final Pattern HTML_PATTERN
Method Detail

handleMessage

void handleMessage(String sender,
                   String message)

getBuddyCount

int getBuddyCount()

hasBuddy

boolean hasBuddy(String buddyName)

getBuddyStatus

int getBuddyStatus(String buddyName)

isOpponentAvailable

boolean isOpponentAvailable()

removeAllBuddies

void removeAllBuddies()

getLogger

GameLogger getLogger()

setLogger

void setLogger(GameLogger logger)

getGame

UnmodifiableGame getGame(String buddyName)
Get an unmodifiable view of the game in which the buddy with this name is involved. If the buddy is not involved in a game, this method will return null