MCPcopy Create free account
hub / github.com/geekcomputers/Python / __init__

Method __init__

Industrial_developed_hangman/src/hangman/main.py:88–105  ·  view source on GitHub ↗

Init MainProcess object. :parameter in_func: Function that will be used to get input in game. :parameter source: Represents source to get word. :parameter pr_func: Function that will be used to print in game. :parameter ch_func: Function that will be used to

(
        self, source: Enum, pr_func: Callable, in_func: Callable, ch_func: Callable
    )

Source from the content-addressed store, hash-verified

86 """Manages game process."""
87
88 def __init__(
89 self, source: Enum, pr_func: Callable, in_func: Callable, ch_func: Callable
90 ) -> None:
91 """
92 Init MainProcess object.
93
94 :parameter in_func: Function that will be used to get input in game.
95 :parameter source: Represents source to get word.
96 :parameter pr_func: Function that will be used to print in game.
97 :parameter ch_func: Function that will be used to choice word.
98 """
99 self._source = source
100 self._answer_word = ""
101 self._word_string_to_show = ""
102 self._guess_attempts_coefficient = 2
103 self._print_function = pr_func
104 self._input_function = in_func
105 self._choice_function = ch_func
106
107 def get_word(self) -> str:
108 # noqa: DAR201

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected