This repository has no description
1use rand::{
2 SeedableRng,
3 rngs::StdRng,
4 seq::{IndexedRandom, IteratorRandom},
5};
6use shapemaker::*;
7
8fn main() {
9 let seed = (0..100u64).choose(&mut rand::rng()).unwrap();
10 // let seed = 84;
11 let mut rng = StdRng::seed_from_u64(seed);
12 let mut canvas = Canvas::new(16, 9);
13 canvas.outer_padding = 30;
14
15 schedule_hell::scenes::dices::setup(&mut canvas);
16
17 schedule_hell::scenes::dices::place_dice(&mut canvas, (2, 0), 2);
18 schedule_hell::scenes::dices::place_dice(&mut canvas, (2, 1), 1);
19 schedule_hell::scenes::dices::place_dice(&mut canvas, (2, 2), 3);
20 schedule_hell::scenes::dices::place_dice(&mut canvas, (1, 1), 4);
21 schedule_hell::scenes::dices::place_dice(&mut canvas, (3, 1), 5);
22 schedule_hell::scenes::dices::place_dice(&mut canvas, (3, 2), 6);
23
24 schedule_hell::scenes::dices::iterate(&mut canvas, &mut rng);
25
26 canvas.root().add(
27 "seed",
28 Text(CornerPoint(0, 0), format!("seed {seed}"), 10.0).colored(White),
29 );
30
31 canvas
32 .render_to_svg_file("result.svg")
33 .expect("Could not write SVG");
34}