Exemplo n.º 1
0
    def session_phase_output(session):
        """Outputs the current phase of the session.

        :param session: a member of the SessionPhase enum

        """
        session_phase_textual = EnumConverters.session_phase_to_string_converter(session.session_phase)

        print("\n" + Fore.GREEN + "Phase: " + session_phase_textual + "\n", end="")

        print(Style.RESET_ALL)
Exemplo n.º 2
0
    def _update_status_bar(self):
        session_phase = self.session.session_phase
        message = EnumConverters.session_phase_to_string_converter(
            session_phase
        )

        if session_phase == SessionPhase.fleet_layout:
            fleet = self.session.player_one.fleet
            current_ship = fleet.ships[self._current_ship_index]
            message += self.tr(", Current ship: {0} (size - {1})".format(
                EnumConverters.ship_type_to_string_converter(
                    current_ship.ship_type
                ),
                current_ship.ship_type.value)
            )

        self.statusLabel.setText(self.tr("Phase: " + message))