Mushroom groves: unclaimable moss where giant mushrooms grow slowly and glow when ready to fell
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
368a338ccf
commit
f8eda88bb3
26 files changed
+321
-43
No files matched your search
@@ -224,3 +224,22 @@ fn export_scenes() {
|
||||
run(&mut g, 1.0);
|
||||
save("room-levels", &mut g, cx as f32 + 1.5, cy as f32 - 2.0, 16.0, 0.0, false);
|
||||
}
|
||||
|
||||
// a mushroom grove: moss, grown (glowing) and young mushrooms
|
||||
#[test]
|
||||
#[ignore]
|
||||
fn export_grove_scene() {
|
||||
std::fs::create_dir_all("/tmp/scenes").unwrap();
|
||||
let mut g = Game::new(9, 96, 96);
|
||||
// the grove tile with the most grove around it
|
||||
let best = (0..g.map.t.len())
|
||||
.filter(|&i| g.map.t[i].kind == Kind::Grove)
|
||||
.max_by_key(|&i| {
|
||||
let (x, y) = xy(i);
|
||||
(-3..=3).flat_map(|dy| (-3..=3).map(move |dx| (dx, dy))).filter(|&(dx, dy)| g.map.get(x + dx, y + dy).map_or(false, |t| matches!(t.kind, Kind::Grove | Kind::Mushroom))).count()
|
||||
})
|
||||
.unwrap();
|
||||
let (x, y) = xy(best);
|
||||
run(&mut g, 1.0);
|
||||
save("mushroom-grove", &mut g, x as f32 + 0.5, y as f32 + 0.5, 12.0, 0.0, false);
|
||||
}
|
||||
Reference in new issue
Block a user