Add optional file logging and fix board offsets

Introduce --log CLI flag to enable logging to
war_in_tunnels.log via simplelog.
This commit is contained in:
2026-03-27 18:28:16 +01:00
parent b71130d3d6
commit a0186ea0cb
8 changed files with 74 additions and 2 deletions
+2 -2
View File
@@ -23,13 +23,13 @@ impl BoardWidget {
let rows: u16 = area_height / CELL_HIGHT;
let cols: u16 = area_width / CELL_WIDTH;
let h_max_offset: usize = if app.states.settings.map_height as u16 > rows {
let v_max_offset: usize = if app.states.settings.map_height as u16 > rows {
app.states.settings.map_height as u16 - rows
} else {
0
} as usize;
let v_max_offset: usize = if app.states.settings.map_width as u16 > cols {
let h_max_offset: usize = if app.states.settings.map_width as u16 > cols {
app.states.settings.map_width as u16 - cols
} else {
0