summaryrefslogtreecommitdiff
path: root/src/solver.rs
diff options
context:
space:
mode:
authorDennis Kobert <dennis@kobert.dev>2020-01-12 03:47:14 +0100
committerDennis Kobert <dennis@kobert.dev>2020-01-12 03:47:14 +0100
commit1650906f010574e8810c8b0b98334e22fac5894d (patch)
treefe27a9d727e143353c1fcf0286890d549c443303 /src/solver.rs
parent6b6f830f8e6d4c0b0d1328b7b22f810ad039d038 (diff)
Restructuring
Diffstat (limited to 'src/solver.rs')
-rwxr-xr-xsrc/solver.rs23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/solver.rs b/src/solver.rs
deleted file mode 100755
index db4e732..0000000
--- a/src/solver.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-use crate::structs::StoneWall;
-
-/// calculate h and w
-pub fn wall_stats(n: u32) -> (u32, u32) {
- let h = (n >> 1) + 1;
- (h, (n - 1) * h)
-}
-
-pub trait Solver {
- fn new(n: u32) -> Self;
- fn n(&self) -> u32;
- fn h(&self) -> u32;
- fn w(&self) -> u32;
-}
-
-pub trait FirstSolver {
- fn solve(self) -> StoneWall;
-}
-
-pub trait IteratorSolver: Solver {
- type IntoIter: Iterator<Item=StoneWall>;
- fn solve(self) -> Self::IntoIter;
-}