Skip to content

Commit

Permalink
feat: timer / gui model info bar
Browse files Browse the repository at this point in the history
  • Loading branch information
latorc committed Apr 17, 2024
1 parent 2967aa8 commit 96889b6
Show file tree
Hide file tree
Showing 6 changed files with 419 additions and 246 deletions.
5 changes: 5 additions & 0 deletions bot/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ def __init__(self, bot_type:BotType, name:str="Bot") -> None:
def supported_modes(self) -> list[GameMode]:
""" return suported game modes"""
return [GameMode.MJ4P]

@property
def info_str(self) -> str:
""" return description info"""
return self.name

def init_bot(self, seat:int, mode:GameMode=GameMode.MJ4P):
""" Initialize the bot before the game starts. Bot must be initialized before a new game
Expand Down
1 change: 1 addition & 0 deletions bot_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ def disable_autojoin(self):
def _create_bot(self):
""" create Bot object based on settings"""
try:
self.bot = None
self.game_exception = Exception("Creating Bot...")
self.bot = get_bot(self.st)
self.game_exception = None
Expand Down
Loading

0 comments on commit 96889b6

Please sign in to comment.