def __notify_game_start(self, max_round): config = self.__gen_config(max_round) start_msg = MessageBuilder.build_game_start_message( config, self.table.seats) self.message_handler.process_message(-1, start_msg) self.message_summarizer.summarize(start_msg) self.game_summarizer.summarize(start_msg)
def test_game_start_message(self): config = self.__setup_config() seats = self.__setup_seats() message = MessageBuilder.build_game_start_message(config, seats) msg = message["message"] self.eq("notification", message["type"]) self.eq(MessageBuilder.GAME_START_MESSAGE, msg["message_type"]) self.eq(MessageBuilder.GAME_START_MESSAGE, msg["message_type"]) self.eq(DataEncoder.encode_game_information(config, seats), msg["game_information"])
def test_game_start_message(self): config = self.__setup_config() seats = self.__setup_seats() message = MessageBuilder.build_game_start_message(config, seats) msg = message["message"] self.eq("notification", message["type"]) self.eq(MessageBuilder.GAME_START_MESSAGE, msg["message_type"]) self.eq(MessageBuilder.GAME_START_MESSAGE, msg["message_type"]) self.eq(DataEncoder.encode_game_information(config, seats), msg["game_information"])
def __game_start_message(self): config = self.__setup_config() seats = self.__setup_seats() return MessageBuilder.build_game_start_message(config, seats)
def __notify_game_start(self, max_round): config = self.__gen_config(max_round) start_msg = MessageBuilder.build_game_start_message(config, self.table.seats) self.message_handler.process_message(-1, start_msg) self.message_summarizer.summarize(start_msg)