diff options
author | Dennis Kobert <dennis@kobert.dev> | 2019-12-20 08:36:02 +0100 |
---|---|---|
committer | Dennis Kobert <dennis@kobert.dev> | 2019-12-20 08:36:02 +0100 |
commit | 9b6de93eb16841f2b974398b7773abfa6b5c07e8 (patch) | |
tree | 3a80b75b606eb57565cc73957680774203afdd80 /src/solvers.rs | |
parent | 0cea4f0ea0ca9d536dacc9084d76be4863b132db (diff) | |
parent | ef2936f2390cb44af811daada625e7d9abf4486a (diff) |
Merge branch 'master' of kobert:/var/repos/babel
Diffstat (limited to 'src/solvers.rs')
-rw-r--r-- | src/solvers.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/solvers.rs b/src/solvers.rs index 2e69a01..52ad4c1 100644 --- a/src/solvers.rs +++ b/src/solvers.rs @@ -3,6 +3,10 @@ pub struct Wall { } impl Wall { + pub fn from_heights(heights: Vec<u32>) -> Self { + Self { heights } + } + fn create_empty(w: u32) -> Self { let heights = if w == 0 { vec![] @@ -14,7 +18,6 @@ impl Wall { v.push(1); v }; - let heights = vec![0, 1, 0, 2, 1, 0, 2, 2, 1]; Self { heights } } |