diff options
Diffstat (limited to 'ausbutler/butler.py')
-rw-r--r-- | ausbutler/butler.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ausbutler/butler.py b/ausbutler/butler.py index 424e385..fb78fdb 100644 --- a/ausbutler/butler.py +++ b/ausbutler/butler.py @@ -14,6 +14,17 @@ def cutoff(score): score += config['cutoff_point'] return score * sign +def get_opponents(butler, player): + table = butler.table + if player in [table.openE, table.openW]: + return [table.openN, table.openS] + if player in [table.openN, table.openS]: + return [table.openE, table.openW] + if player in [table.closeE, table.closeW]: + return [table.closeN, table.closeS] + if player in [table.closeN, table.closeS]: + return [table.closeE, table.closeW] + def get_room(butler, player): table = butler.table if player in [table.openE, table.openW, table.openN, table.openS]: |