Allow the bot to prioritize playing against humans or bots. For example, if someone changes preference to human and has sort_by set to best, then the bot will prefer to play with a human even if they are rated lower than a bot. The order of opponents will be:
HUMAN A (2100)
HUMAN B (1800)
HUMAN C (1500)
BOT A (3000)
BOT B (2500)
One more thing. Since there are a finite set of options for this new configuration, there should be a test in validate_config() that checks that the value, if it is present, is from that set.
Type of pull request:
Description:
Allow the bot to prioritize playing against humans or bots. For example, if someone changes
preference
tohuman
and hassort_by
set tobest
, then the bot will prefer to play with a human even if they are rated lower than a bot. The order of opponents will be:Related Issues:
None
Checklist:
Screenshots/logs (if applicable):