feat: Implement crop withering mechanics (#28)

This commit is contained in:
demenik
2025-12-02 19:05:11 +01:00
parent 6b28ce7ab1
commit d2db146eb6
7 changed files with 43 additions and 2 deletions

View File

@@ -86,6 +86,8 @@ fn test_crop_growth_logic() {
seed: seed_type.clone(),
watered: true,
growth_stage: 0,
withered: false,
dry_counter: 0,
},
),
(
@@ -95,6 +97,8 @@ fn test_crop_growth_logic() {
seed: seed_type.clone(),
watered: false,
growth_stage: 0,
withered: false,
dry_counter: 0,
},
),
(
@@ -104,6 +108,8 @@ fn test_crop_growth_logic() {
seed: seed_type.clone(),
watered: true,
growth_stage: 2, // Max
withered: false,
dry_counter: 0,
},
),
];

View File

@@ -180,6 +180,8 @@ fn test_water_crop() {
seed: seed_type.clone(),
watered: false,
growth_stage: 0,
withered: false,
dry_counter: 0,
},
)],
vec![],

View File

@@ -95,6 +95,8 @@ fn test_find_path_around_obstacle() {
},
watered: false,
growth_stage: 0,
withered: false,
dry_counter: 0,
};
let obstacles = vec![
(2, 2, obstacle.clone()),
@@ -148,6 +150,8 @@ fn test_find_path_no_path() {
},
watered: false,
growth_stage: 0,
withered: false,
dry_counter: 0,
};
let obstacles = vec![
(2, 0, obstacle.clone()),