
function bot_test(roll,bets)
	if #bets > 0 and math.random(0,1) == 0 then return false end
	local item = math.random(1,6)
	local bet = bets[#bets]
	local count = 1
	if bet then count = bet.count + 1 end
	return {item=item, count=count}
end


function bot_basic(roll,bets)
	local ok = false
	local count = 1
	local bet = bets[#bets]

	if bet == nil then
		ok = true
	else
		count = bet.count
		if count <= (1 + (roll[bet.item] or 0)) then
			ok = true
		end
	end

	if not ok then return false end

	local best = nil; local value = 0
	local map = roll2map(roll)
	for k,v in pairs(map) do
		if v > value then best = k; value = v end
	end

	count = count + 1
	return {item=best,count=count}
end