Twitch-Channel-Points-Miner-v2 icon indicating copy to clipboard operation
Twitch-Channel-Points-Miner-v2 copied to clipboard

Give a possibility to write custom bet strategies

Open KamushekDev opened this issue 2 years ago • 3 comments

Is your feature request related to a problem? Please describe. I found that presented betting strategies aren't enough for me.

Describe the solution you'd like I would like to have the possibility to provide a custom decision-making function to the BetSettings object. I imagine that function smth like (BetContext context) => BetDecision. Where BetContext contains all necessary information about a bet and BetDecision represents a decision like

{
  result: BetDecisionResult (BET_1, BET_2, BET_3, DONT_BET)
  amount: int
}

Describe alternatives you've considered

  • It could be made by changing the source code, but it would cause trouble with updates and could be damaging :c
  • Adding every betting strategy from pull requests is working but pretty messy approach. It would bloat strategies with some specific things in the long run.

Additional context I didn't think over what information should be in a BetContext, but I assume there should be all available information.

KamushekDev avatar May 03 '22 12:05 KamushekDev

Maybe even allow redirect to built-in strategy as a decision.

KamushekDev avatar May 03 '22 12:05 KamushekDev

https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/pull/172

1v avatar May 09 '22 19:05 1v

https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/pull/172

It's a PR for adding another strategy but this issue targets a more generic approach.

KamushekDev avatar May 09 '22 20:05 KamushekDev