Skip to content

Commit

Permalink
Added docstrings for guidance
Browse files Browse the repository at this point in the history
  • Loading branch information
maxfierrog committed Apr 19, 2024
1 parent 74fcbb1 commit 3968358
Showing 1 changed file with 23 additions and 14 deletions.
37 changes: 23 additions & 14 deletions src/game/mock/example.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,16 @@ pub mod simple_utility {
/* INSTANTIATION */

impl<'a> TreeExampleGame<'a> {
/// TODO
/// Creates a new [`TreeExampleGame`] by instantiating all of its
/// nodes and appending them to `store` non-destructively (even if
/// the function fails). The example game returned will reference
/// the nodes added to `store` internally, so removing them from
/// `store` and attempting to use the returned game after is
/// undefined behavior.
pub fn new(
store: &'a mut Vec<Node>,
) -> Result<TreeExampleGame<'a>> {
*store = vec![
let mut nodes = vec![
node!(0),
node!(1),
node!(1),
Expand Down Expand Up @@ -113,6 +118,10 @@ pub mod simple_utility {
],
];

let length = store.len();
store.append(&mut nodes);
let store = &store[length..];

let game = builder::SessionBuilder::new(&TREE_GAME_NAME)
.edge(&store[0], &store[1])?
.edge(&store[0], &store[2])?
Expand All @@ -138,7 +147,7 @@ pub mod simple_utility {
Ok(TreeExampleGame { game })
}

/// TODO
/// Creates a PNG image of the game being represented.
pub fn visualize(&self) -> Result<()> {
self.game
.visualize(super::super::MODULE_STORAGE)
Expand All @@ -153,7 +162,7 @@ pub mod simple_utility {
todo!()
}

/// TODO
/// Creates a PNG image of the game being represented.
pub fn visualize(&self) -> Result<()> {
self.game
.visualize(super::super::MODULE_STORAGE)
Expand All @@ -168,7 +177,7 @@ pub mod simple_utility {
todo!()
}

/// TODO
/// Creates a PNG image of the game being represented.
pub fn visualize(&self) -> Result<()> {
self.game
.visualize(super::super::MODULE_STORAGE)
Expand Down Expand Up @@ -257,7 +266,7 @@ pub mod simple_utility {
todo!()
}

/// TODO
/// Creates a PNG image of the game being represented.
pub fn visualize(&self) -> Result<()> {
self.game
.visualize(super::super::MODULE_STORAGE)
Expand All @@ -272,7 +281,7 @@ pub mod simple_utility {
todo!()
}

/// TODO
/// Creates a PNG image of the game being represented.
pub fn visualize(&self) -> Result<()> {
self.game
.visualize(super::super::MODULE_STORAGE)
Expand All @@ -287,7 +296,7 @@ pub mod simple_utility {
todo!()
}

/// TODO
/// Creates a PNG image of the game being represented.
pub fn visualize(&self) -> Result<()> {
self.game
.visualize(super::super::MODULE_STORAGE)
Expand Down Expand Up @@ -368,7 +377,7 @@ pub mod general_utility {
todo!()
}

/// TODO
/// Creates a PNG image of the game being represented.
pub fn visualize(&self) -> Result<()> {
self.game
.visualize(super::super::MODULE_STORAGE)
Expand All @@ -383,7 +392,7 @@ pub mod general_utility {
todo!()
}

/// TODO
/// Creates a PNG image of the game being represented.
pub fn visualize(&self) -> Result<()> {
self.game
.visualize(super::super::MODULE_STORAGE)
Expand All @@ -398,7 +407,7 @@ pub mod general_utility {
todo!()
}

/// TODO
/// Creates a PNG image of the game being represented.
pub fn visualize(&self) -> Result<()> {
self.game
.visualize(super::super::MODULE_STORAGE)
Expand Down Expand Up @@ -471,7 +480,7 @@ pub mod general_utility {
todo!()
}

/// TODO
/// Creates a PNG image of the game being represented.
pub fn visualize(&self) -> Result<()> {
self.game
.visualize(super::super::MODULE_STORAGE)
Expand All @@ -486,7 +495,7 @@ pub mod general_utility {
todo!()
}

/// TODO
/// Creates a PNG image of the game being represented.
pub fn visualize(&self) -> Result<()> {
self.game
.visualize(super::super::MODULE_STORAGE)
Expand All @@ -501,7 +510,7 @@ pub mod general_utility {
todo!()
}

/// TODO
/// Creates a PNG image of the game being represented.
pub fn visualize(&self) -> Result<()> {
self.game
.visualize(super::super::MODULE_STORAGE)
Expand Down

0 comments on commit 3968358

Please sign in to comment.