Add tests, fix offset logic, and bump dependencies

- Introduce a comprehensive test suite (cli, app, board, tasks, audio)
  and a
  new TESTING.md document describing test execution.
- Correct vertical offset calculation in `BoardState` to use saturating
  subtraction and ceiling division.
- Clamp initial `Offset` values to the provided maximum in
  `Offset::new`.
- Export `load_audio` from the audio thread module and switch to
  `LoopedDecoder` for proper OGG looping.
- Update several crate versions: clap, ratatui, log, rodio, and
  bitflags.
This commit is contained in:
GarandPLG committed 2026-10-18 20:29:04 +02:00
1 parent 9bc42dc898
commit fcdbbaf74c
16 files changed
+817 -246

No files matched your search

@@ -1,5 +1,5 @@
use crate::app::states::skirmish_states::tasks::Task;
use std::{collections::VecDeque, ops::Add};
use std::collections::VecDeque;
#[derive(Debug, Clone, PartialEq)]
pub struct DiggingTask {
@@ -49,7 +49,7 @@ impl Task for DiggingTask {
}
fn progress(&mut self) {
let _ = self.progress.add(self.tick_increase).max(0.0).min(100.0);
self.progress = (self.progress + self.tick_increase).clamp(0.0, 100.0);
}
fn is_finished(&self) -> bool {