Commits

Anonymous committed 6a2d306

added refactoring TODO + √ for the first refactoring task.

Comments (0)

Files changed (1)

 __plan__ = """
 Step by step:
 
-1. First all logic from UiState into the model. Model gets all state which is independent of the UI. Any necessary interaction in UiState calls model methods.
+1. First all logic from UiState into the model. Model gets all state which is independent of the UI. Any necessary interaction in UiState calls model methods. √
 2. Refactor in such a way that the UiState and (even more importantly) the input do not need to call the model directly anymore.
 2.1. As a start, return all actions on every command: command(...) → commands (instance of Commands).
 3. Make the UiState adhere the list of possible commands.
         next_char.attack_best_target_if_possible()
         self._initiative_step_current()
         self.phase["player"] = "wait"
+        # TODO: return the result of the action instead. Or at least a list of changed characters. Best a list of all characters who changed state and how they changed state.
         return Result("step", commands=[Command(self.switch_to_cpu_turn, "continue")])