示例#1
0
    def __init__(self, opponents, result_str):
        """ Construct an opponent section.

        Required:
        list    opponents   a list of Opponent objects.
        str     results_str a string for the result of the opponent group

        """
        super(OpponentsResultGroup, self).__init__()
        self.append_class(self.OPPONENTS_RESULT_GROUP_CLASS)

        # each opponent with a thumbnail and name
        self.append_child(OpponentsList(opponents))

        # the result of the opponent group
        result_div = Div()
        result_div.set_text(result_str)
        self.append_child(result_div)