package com.beecavegames.poker.bot.strategies;

import com.beecavegames.poker.PokerSeat;
import com.beecavegames.poker.PokerTable;
import com.beecavegames.poker.bot.PokerBot;
import com.beecavegames.poker.fsm.Event;

public class BailStrategy extends AbstractPlayStrategy {

	private static final long serialVersionUID = 1907002434105093275L;

	public double betToStackRatio;
	public double minHandStrength;
	
	@Override
	public Event call(PokerBot bot, PokerSeat seat, PokerTable table) {
		double bsr = seat.bet.divide(bot.getBalance()).doubleValue();
		if (bsr > betToStackRatio && seat.getWinPercentage()<minHandStrength) {
			return Event.FOLD;
		} else {
			return null;
		}
	}
}
