diff options
| author | a14m <[email protected]> | 2021-04-07 14:01:42 +0200 |
|---|---|---|
| committer | a14m <[email protected]> | 2021-04-07 14:01:42 +0200 |
| commit | bd0ef4dcf5b46664c9e0b206f6acd8cf9b3532da (patch) | |
| tree | ae632b71112538349743bc22e98e46bfba9abb44 /CLI/rust/src/game_of_life.rs | |
| parent | 61c49255eba642ee342aee5f7b02a57eec2cd84f (diff) | |
Add Plane (circular array) implementation w/testing
Refactor the code to use Plane struct instead of Vec<bool>
Diffstat (limited to 'CLI/rust/src/game_of_life.rs')
| -rw-r--r-- | CLI/rust/src/game_of_life.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/CLI/rust/src/game_of_life.rs b/CLI/rust/src/game_of_life.rs index 6b52034..96ec3d9 100644 --- a/CLI/rust/src/game_of_life.rs +++ b/CLI/rust/src/game_of_life.rs @@ -175,12 +175,13 @@ pub(crate) fn generate(opts: Opts) -> Result<Universe, Error> { mod generate { use super::*; use mocktopus::mocking::*; + use crate::game_of_life::universe::Plane; fn universe_mock(opts: Opts) -> Universe { Universe { opts, - current: vec![vec![]], - future: vec![vec![]], + current: vec![Plane(vec![])], + future: vec![Plane(vec![])], } } |
