Commit Graph
7 Commits
Author SHA1 Message Date
GarandPLG 73f544d5d6 Update formatting to use 4‑space indentation
Nix package / build (push) Successful in 8m44s
Linux package builds (test) / linux (push) Successful in 2m25s
Linux package builds (test) / aur (push) Successful in 7m41s
Rust checks / check (push) Successful in 3m39s
- Adjust rustfmt.toml to set tab_spaces = 4.
- Reformat imports, struct definitions, function bodies, and match arms
  across the project to match the new style (aligned fields, added
  spacing, etc.).
- Ensure all code complies with the updated rustfmt settings.
2026-10-19 17:43:43 +02:00
GarandPLG a981663152 Rename iron to metal, add mining and recruitment
Nix package / build (push) Successful in 9m39s
Rust checks / check (push) Successful in 3m44s
Linux package builds (test) / linux (push) Successful in 2m22s
Linux package builds (test) / aur (push) Successful in 7m21s
- Updated CLI, README and documentation to use `--starting-metal` with
  `--starting-iron` retained as an alias.
- Introduced `Resources` struct and constants for wood delivery and mine
  production.
- Added new structures `Mine` and `MineConstruction` with cost,
  production
  and cancel logic.
- Implemented building view for constructing mines and recruitment view
  for spawning miners.
- Extended keybindings with `Building` and `Recruitment` actions and
  updated
  action availability logic.
- Modified game state, board, units and UI widgets to handle metal
  resources
  and new construction mechanics.
- Updated tests and increased total test count to 82, covering
  resources,
  construction, recruitment and context‑aware keybindings.
2026-10-19 17:41:22 +02:00
GarandPLG c4313b4117 Add rustfmt configuration and reformat code
- Document new Rust formatting standards in AGENTS, CODE_MAP, and
  PROGRESS.
- Add rustfmt.toml with style 2024, 2‑space indents, 100‑char width, LF
  endings.
- Apply consistent 2‑space indentation and ordering across source files.
- Minor clean‑up of imports and whitespace to match the new style.
2026-10-19 12:21:20 +02:00
GarandPLG b639531841 Refactor GameMode and Players into skirmish_states
Move the GameMode and Players enums from the top‑level states module
into the
skirmish_states submodule, add an Unclaimed variant to Players, and
update all
imports, trait implementations, and related logic accordingly. Adjust
the
durability percentage calculation to use u32 for safety.
2026-05-01 19:05:03 +02:00
GarandPLG 9300eef906 Initialize skirmish board and refactor states
- Create `GameStates` from a `&Cli` and initialize the skirmish board in
  `App::new`.
- Move map dimensions to `SkirmishState` and add a `board_cells` vector
  populated by `CellWidget`s.
- Refactor `SettingsState` to store only user‑specific settings (fields
  are cloned).
- Update `BoardWidget` to hold a reference to the cell vector and use
  the new dimensions.
- Adjust CLI defaults: map width to 50 and map height to 25.
2026-03-27 19:25:20 +01:00
GarandPLG 0577697059 Replace settings module with skirmish mode
Removed the settings UI and its keybinding logic, added a skirmish view
and corresponding keybindings, simplified the SettingsState to hold
skirmish configuration, updated module exports, and changed the CLI
default map height from 25 to 21. Also fixed the main menu selection
limit.
2026-03-17 14:28:46 +01:00
GarandPLG aaa2c90426 Refactor gaamestates 2026-03-16 21:58:43 +01:00