1mod content;
3mod layout;
4pub mod model;
5mod view;
6use ferravex_arcade::{Color, Conf, Meta, window};
7pub use model::{Game, Phase};
8pub const META: Meta = Meta {
10 id: "stormbound",
11 title: "Stormbound",
12 subtitle: "Naval artillery",
13 controls: "Arrows Aim | Act Fire | 1-3 Ammo | X Hint | C Retreat | 1-4 Shipyard",
14 help: &[
15 "Sink all three hull sections of every enemy ship.",
16 "Wind bends every shot; follow the dotted arc.",
17 "Chain fells masts; shells ignore armor and splash.",
18 "Spend salvage at the shipyard. Lifeboats retry islands.",
19 ],
20 accent: Color::new(0.97, 0.76, 0.37, 1.),
21};
22fn conf() -> Conf {
23 window(META.title)
24}
25async fn game() {
26 ferravex_arcade::run::<Game>(META).await;
27}
28ferravex_render::game!(conf, game);
29
30#[cfg(test)]
31mod tests {
32 use super::META;
33 use ferravex_arcade::{PAPER, style, typography::text_width};
34 #[test]
35 fn help_is_four_short_bullets_on_one_guide_page() {
36 assert!(META.help.len() <= 4);
37 for line in META.help {
38 assert!(line.split_whitespace().count() < 15, "{line}");
39 assert!(text_width(line, style(18., PAPER)) <= 600., "{line}");
41 }
42 assert!(META.subtitle.split_whitespace().count() <= 3);
43 }
44}