// Path: src/shaft/poker/game/IAction.java
// public interface IAction {
//     
//     public ActionType type();
//     
//     public int amount();
//     
// }
// 
// Path: src/shaft/poker/game/ITable.java
// public interface ITable {
//    
//     enum ActionType {
//         FOLD,
//         CALL,
//         BET
//     }
//     
//     enum Round {
//         PREFLOP,
//         FLOP,
//         TURN,
//         RIVER
//     }
//     
//     public void runGame(int hands, int stackSize, int sBlind, int bBlind);
//     
//     public int numberBets();
//     public int maxBets();
//     public int numberCallers();
//     public Round round();
//     public int potSize();
//     
//     public int numberPlayers();
//     public int numberActivePlayers();
//     public int numberPlayersToAct();
//     
//     public int smallBlind();
//     public int bigBlind();
//     
//     public List<Card> board();
//     
//     public String playerSmallBlind();
//     public String playerBigBlind();
//     public String playerDealer();
//     
//     public void registerListenerForPlayer(String id, IPlayerActionListener listener);
//     public void registerPriorityListenerForPlayer(String id, IPlayerActionListener listener);
//     public void registerListenAllPlayerEvents(IPlayerActionListener listener);
//     public void registerEventListener(IGameEventListener listener);
// 
// }
// 
// Path: src/shaft/poker/game/ITable.java
// enum ActionType {
//     FOLD,
//     CALL,
//     BET
// }


import shaft.poker.game.IAction;
import shaft.poker.game.ITable;
import shaft.poker.game.ITable.ActionType;
import shaft.poker.game.table.*;
    }
    
    @Override
    public IAction makeBBlind() {
        int amount = _bBlind - _sBlind;
        if (amount > _plStack) {
            amount = _plStack;
        }
        return new GameAction(ActionType.BET, amount);
    }

    @Override
    public IAction makeFold() {
        return new GameAction(ActionType.FOLD, 0);
    }
    
    @Override
    public IAction makeCall() {
        int amount = _toCall;
        if (_plStack < _toCall) {
            amount = _plStack;
        }
        return new GameAction(ITable.ActionType.CALL, amount);
    }
    
    @Override
    public IAction makeRaise(int amount) {
        if (amount > 0) {
            if (amount > minRaise() || amount == maxRaise()) {
                if (amount <= maxRaise()) {
// Path: src/shaft/poker/game/IAction.java
// public interface IAction {
//     
//     public ActionType type();
//     
//     public int amount();
//     
// }
// 
// Path: src/shaft/poker/game/ITable.java
// public interface ITable {
//    
//     enum ActionType {
//         FOLD,
//         CALL,
//         BET
//     }
//     
//     enum Round {
//         PREFLOP,
//         FLOP,
//         TURN,
//         RIVER
//     }
//     
//     public void runGame(int hands, int stackSize, int sBlind, int bBlind);
//     
//     public int numberBets();
//     public int maxBets();
//     public int numberCallers();
//     public Round round();
//     public int potSize();
//     
//     public int numberPlayers();
//     public int numberActivePlayers();
//     public int numberPlayersToAct();
//     
//     public int smallBlind();
//     public int bigBlind();
//     
//     public List<Card> board();
//     
//     public String playerSmallBlind();
//     public String playerBigBlind();
//     public String playerDealer();
//     
//     public void registerListenerForPlayer(String id, IPlayerActionListener listener);
//     public void registerPriorityListenerForPlayer(String id, IPlayerActionListener listener);
//     public void registerListenAllPlayerEvents(IPlayerActionListener listener);
//     public void registerEventListener(IGameEventListener listener);
// 
// }
// 
// Path: src/shaft/poker/game/ITable.java
// enum ActionType {
//     FOLD,
//     CALL,
//     BET
// }


// Path: src/shaft/poker/game/table/actionbuilder/AActionBuilder.java
import shaft.poker.game.IAction;
import shaft.poker.game.ITable;
import shaft.poker.game.ITable.ActionType;
import shaft.poker.game.table.*;

    }
    
    @Override
    public IAction makeBBlind() {
        int amount = _bBlind - _sBlind;
        if (amount > _plStack) {
            amount = _plStack;
        }
        return new GameAction(ActionType.BET, amount);
    }

    @Override
    public IAction makeFold() {
        return new GameAction(ActionType.FOLD, 0);
    }
    
    @Override
    public IAction makeCall() {
        int amount = _toCall;
        if (_plStack < _toCall) {
            amount = _plStack;
        }
        return new GameAction(ITable.ActionType.CALL, amount);
    }
    
    @Override
    public IAction makeRaise(int amount) {
        if (amount > 0) {
            if (amount > minRaise() || amount == maxRaise()) {
                if (amount <= maxRaise()) {
                    return new GameAction(ITable.ActionType.BET, amount);