diff options
| author | a14m <[email protected]> | 2021-04-04 01:08:05 +0200 |
|---|---|---|
| committer | a14m <[email protected]> | 2021-04-04 01:08:05 +0200 |
| commit | c9084a6aa4b234fdb77b838bc1fb903145a6b88f (patch) | |
| tree | 9ec97daf4536069ff87dbae11a5832c456f7bd78 | |
| parent | 6bd9a672034b2ad1202fec3ecdc9cd6e69288e49 (diff) | |
Add the skeleton of the generators modules/methods
| -rw-r--r-- | CLI/rust/src/game_of_life/generators.rs | 4 | ||||
| -rw-r--r-- | CLI/rust/src/game_of_life/generators/input.rs | 12 | ||||
| -rw-r--r-- | CLI/rust/src/game_of_life/generators/seed.rs | 10 |
3 files changed, 26 insertions, 0 deletions
diff --git a/CLI/rust/src/game_of_life/generators.rs b/CLI/rust/src/game_of_life/generators.rs new file mode 100644 index 0000000..16bd7c3 --- /dev/null +++ b/CLI/rust/src/game_of_life/generators.rs @@ -0,0 +1,4 @@ +/// Generate a new Universe/Board from a parsed local file or remote URL/file +pub(crate) mod input; +/// Generate a new Universe/Board from a seed number +pub(crate) mod seed; diff --git a/CLI/rust/src/game_of_life/generators/input.rs b/CLI/rust/src/game_of_life/generators/input.rs new file mode 100644 index 0000000..2ce8944 --- /dev/null +++ b/CLI/rust/src/game_of_life/generators/input.rs @@ -0,0 +1,12 @@ +use crate::game_of_life::opts::Opts; +use crate::game_of_life::universe::Universe; + +/// Generate a new Universe/Board with a parsed local file or remote URL/file +/// +/// If a URL is provided as an input (starting with http/ftp) the URL/File will be downloaded +/// and parsed to generate a seeding input for the simulation +/// otherwise, it'll be assumed that it's a path to a local file that will be parsed, and +/// used as the seeding input +pub(crate) fn new(opts: Opts) -> Universe { + unimplemented!() +} diff --git a/CLI/rust/src/game_of_life/generators/seed.rs b/CLI/rust/src/game_of_life/generators/seed.rs new file mode 100644 index 0000000..8a10ac0 --- /dev/null +++ b/CLI/rust/src/game_of_life/generators/seed.rs @@ -0,0 +1,10 @@ +use crate::game_of_life::opts::Opts; +use crate::game_of_life::universe::Universe; + +/// Generate a new Universe/Board from a seed number +/// +/// The generation of the seed should be stable across different machines +/// using the same language package, version, width and height. +pub(crate) fn new(opts: Opts) -> Universe { + unimplemented!() +} |
