feat: module 10 spellgrid
SpellGrid capstone: Part I's card engine and Part II's grid engine joined at three seams (rules -> aura data, hazard victims -> one destroy Sequence, Sequence end -> write text, remove the dead, reparse). Three levels with scripted solutions, a naive-timing test via a harness-only hook that reverses the END_OF_PHASE list, CLIs in both tracks, the BATTLECRY IS DOUBLE Expansion Drop, SpellGrid cards and words in course/cards and the catalog, level schema cards/hand, and tools staging/copying of module levels. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1f3359cfe2
commit
a0cf9be214
96 files changed
+10454
-8
No files matched your search
@@ -0,0 +1,21 @@
|
||||
//! SpellGrid on the command line. See `src/cli.rs`.
|
||||
//!
|
||||
//! `cargo run --bin spellgrid -- levels/l1-double-tap.json`
|
||||
|
||||
use std::io::{self, BufReader};
|
||||
|
||||
use engine::cli::{run, Outcome};
|
||||
|
||||
fn main() {
|
||||
let Some(path) = std::env::args().nth(1) else {
|
||||
eprintln!("usage: cargo run --bin spellgrid -- <level.json>");
|
||||
std::process::exit(2);
|
||||
};
|
||||
let level = std::fs::read_to_string(&path).unwrap_or_else(|e| {
|
||||
eprintln!("cannot read {path}: {e}");
|
||||
std::process::exit(2);
|
||||
});
|
||||
let input = Box::new(BufReader::new(io::stdin()));
|
||||
let outcome = run(&level, input, Box::new(io::stdout()));
|
||||
std::process::exit(if outcome == Outcome::Won { 0 } else { 1 });
|
||||
}
|
||||
Reference in new issue
Block a user