Add progress tracking to tasks and turn advancement

- Extend the `Task` trait with methods for progress handling and
  completion.
- Update `DiggingTask` to store `progress` and `tick_increase`, and
  implement the new trait methods.
- Implement the new methods in the `Tasks` enum, adding a mutable
  accessor.
- Introduce `BoardState::get_active_tasks` and
  `BoardState::advance_turn` to iterate over active tasks and update
  their progress each turn.
- Un-comment the call to `board.advance_turn()` in
  `SkirmishState::tick_update`.
This commit is contained in:
2026-05-20 12:49:18 +02:00
parent c3b76a7c2e
commit 00eeb97ed8
5 changed files with 70 additions and 7 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ pub struct SkirmishState {
impl SkirmishState {
pub fn tick_update(&mut self) {
// self.board.advance_turn();
self.board.advance_turn();
// if self.board.is_victory() {}