adinkra1/adinkra1.rs
1use graph_solver::*;
2
3// Notice that edges starts with `2`.
4const RED: Color = 2;
5
6fn main() {
7 let mut g = Graph::new();
8 let a = Node {
9 color: 0,
10 self_connected: false,
11 edges: vec![Constraint {edge: RED, node: 1}]
12 };
13 let b = Node {
14 color: 1,
15 self_connected: false,
16 edges: vec![Constraint {edge: RED, node: 0}]
17 };
18 g.push(a);
19 g.push(b);
20
21 let solve_settings = SolveSettings::new();
22 if let Some(solution) = g.solve(solve_settings) {
23 solution.puzzle.print();
24 }
25}