feat(simulator): ✨ Implement new solo dominion simulation mechanics and fixes
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
42f15dc163
commit
6ade8dbdff
1 changed files with 20 additions and 2 deletions
|
|
@ -88,7 +88,15 @@ fn main() {
|
|||
|
||||
let starting_units: Vec<MapUnit> = hex::offset_neighbors(city_pos.0, city_pos.1, MAP_SIZE, MAP_SIZE)
|
||||
.into_iter().take(3)
|
||||
.map(|(uc, ur)| MapUnit { col: uc, row: ur, hp: 60, max_hp: 60, attack: 12, defense: 1, is_fortified: false, unit_id: "dwarf_warrior".into(), held_resources: Vec::new(), patrol_order: None })
|
||||
.map(|(uc, ur)| MapUnit {
|
||||
col: uc, row: ur, hp: 60, max_hp: 60, attack: 12, defense: 1,
|
||||
is_fortified: false, unit_id: "dwarf_warrior".into(),
|
||||
held_resources: Vec::new(), patrol_order: None,
|
||||
// Fields added during the centre+edge stage work — bench units
|
||||
// get auto_join=true (military default) and zero ids (renumbered
|
||||
// by aggregate_formations on first turn).
|
||||
id: 0, formation_id: None, auto_join: true,
|
||||
})
|
||||
.collect();
|
||||
|
||||
let player = PlayerState {
|
||||
|
|
@ -123,7 +131,17 @@ fn main() {
|
|||
..Default::default()
|
||||
};
|
||||
|
||||
let mut state = GameState { turn: 0, players: vec![player], grid: Some(grid), pending_pvp_attacks: Default::default() };
|
||||
let mut state = GameState {
|
||||
turn: 0,
|
||||
players: vec![player],
|
||||
grid: Some(grid),
|
||||
pending_pvp_attacks: Default::default(),
|
||||
// All other fields (formations, improvement_registry, next_*_id,
|
||||
// pending_*_requests, etc.) take their derived defaults — empty
|
||||
// maps / zero counters / empty queues — appropriate for a fresh
|
||||
// bench scenario.
|
||||
..Default::default()
|
||||
};
|
||||
let processor = TurnProcessor::new(TOTAL_TURNS + 10);
|
||||
|
||||
eprintln!("# Solo player starting at ({},{}) — anchor lair at ({lc},{lr})", city_pos.0, city_pos.1);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue