generated from GarandPLG/rust-flake-template
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:
1 parent
9bc42dc898
commit
fcdbbaf74c
16 files changed
+817
-246
No files matched your search
@@ -51,7 +51,7 @@ impl BoardState {
|
||||
let h_max_offset: usize = Self::max_offset(map_width, cols);
|
||||
|
||||
let vertical_offset: Offset = Offset::new(
|
||||
Some((map_height - rows as usize + 1) / 2),
|
||||
Some(map_height.saturating_sub(rows).div_ceil(2)),
|
||||
Some(v_max_offset),
|
||||
);
|
||||
let horizontal_offset: Offset = Offset::new(None, Some(h_max_offset));
|
||||
|
||||
Reference in new issue
Block a user