generated from GarandPLG/rust-flake-template
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:
1 parent
c3b76a7c2e
commit
00eeb97ed8
5 files changed
+70
-7
No files matched your search
@@ -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() {}
|
||||
|
||||
|
||||
Reference in new issue
Block a user