Exemple #1
0
 def setup_game(self) -> None:
     bot = self.add_user_to_cache('foo')
     self.add_user_to_cache('baz', bot)
     instance = GameInstance(bot, False, 'test game', 'abc123',
                             ['*****@*****.**', '*****@*****.**'], 'test')
     bot.instances.update({'abc123': instance})
     instance.start()
     return bot
 def setup_game(self) -> None:
     bot = self.add_user_to_cache("foo")
     self.add_user_to_cache("baz", bot)
     instance = GameInstance(bot, False, "test game", "abc123",
                             ["*****@*****.**", "*****@*****.**"], "test")
     bot.instances.update({"abc123": instance})
     instance.start()
     return bot
 def setup_computer_game(self) -> Any:
     bot = self.add_user_to_cache('foo')
     bot.email = '*****@*****.**'
     self.add_user_to_cache('test-bot', bot)
     instance = GameInstance(bot, False, 'test game', 'abc123', [
                             '*****@*****.**', '*****@*****.**'], 'test')
     bot.instances.update({'abc123': instance})
     instance.start()
     return bot
Exemple #4
0
 def setup_computer_game(self) -> Any:
     bot = self.add_user_to_cache("foo")
     bot.email = "*****@*****.**"
     self.add_user_to_cache("test-bot", bot)
     instance = GameInstance(bot, False, "test game", "abc123",
                             ["*****@*****.**", "*****@*****.**"],
                             "test")
     bot.instances.update({"abc123": instance})
     instance.start()
     return bot
 def setup_computer_game(self) -> Any:
     bot = self.add_user_to_cache('foo')
     bot.email = '*****@*****.**'
     self.add_user_to_cache('test-bot', bot)
     instance = GameInstance(bot, False, 'test game', 'abc123',
                             ['*****@*****.**', '*****@*****.**'],
                             'test')
     bot.instances.update({'abc123': instance})
     instance.start()
     return bot
 def setup_game(self, id: str='', bot: Any=None, players: List[str]=['foo', 'baz'], subject: str='test game', stream: str='test') -> Any:
     if bot is None:
         bot, bot_handler = self._get_handlers()
     for p in players:
         self.add_user_to_cache(p, bot)
     players_emails = [p + '@example.com' for p in players]
     game_id = 'abc123'
     if id != '':
         game_id = id
     instance = GameInstance(bot, False, subject,
                             game_id, players_emails, stream)
     bot.instances.update({game_id: instance})
     instance.turn = -1
     instance.start()
     return bot
 def setup_game(self,
                id: str = '',
                bot: Any = None,
                players: List[str] = ['foo', 'baz'],
                subject: str = 'test game',
                stream: str = 'test') -> Any:
     if bot is None:
         bot, bot_handler = self._get_handlers()
     for p in players:
         self.add_user_to_cache(p, bot)
     players_emails = [p + '@example.com' for p in players]
     game_id = 'abc123'
     if id != '':
         game_id = id
     instance = GameInstance(bot, False, subject, game_id, players_emails,
                             stream)
     bot.instances.update({game_id: instance})
     instance.turn = -1
     instance.start()
     return bot
Exemple #8
0
 def setup_game(
     self,
     id: str = "",
     bot: Any = None,
     players: List[str] = ["foo", "baz"],
     subject: str = "test game",
     stream: str = "test",
 ) -> Any:
     if bot is None:
         bot, bot_handler = self._get_handlers()
     for p in players:
         self.add_user_to_cache(p, bot)
     players_emails = [p + "@example.com" for p in players]
     game_id = "abc123"
     if id != "":
         game_id = id
     instance = GameInstance(bot, False, subject, game_id, players_emails,
                             stream)
     bot.instances.update({game_id: instance})
     instance.turn = -1
     instance.start()
     return bot