summaryrefslogtreecommitdiff
path: root/src/solvers.rs
diff options
context:
space:
mode:
authorDennis Kobert <dennis@kobert.dev>2019-12-20 08:36:02 +0100
committerDennis Kobert <dennis@kobert.dev>2019-12-20 08:36:02 +0100
commit9b6de93eb16841f2b974398b7773abfa6b5c07e8 (patch)
tree3a80b75b606eb57565cc73957680774203afdd80 /src/solvers.rs
parent0cea4f0ea0ca9d536dacc9084d76be4863b132db (diff)
parentef2936f2390cb44af811daada625e7d9abf4486a (diff)
Merge branch 'master' of kobert:/var/repos/babel
Diffstat (limited to 'src/solvers.rs')
-rw-r--r--src/solvers.rs5
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 }
}