Skip to content

Commit

Permalink
feat: add 'new' function to 'Actions' struct
Browse files Browse the repository at this point in the history
  • Loading branch information
ShenMian committed May 18, 2024
1 parent d7ceb3d commit b27551f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/actions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ pub struct SecondaryValues {
pub struct Actions(pub Vec<Action>);

impl Actions {
/// Creates a new empty sequence of actions.
pub fn new() -> Self {
Default::default()
}

/// Returns the total number of moves.
pub fn moves(&self) -> usize {
self.len()
Expand Down

0 comments on commit b27551f

Please sign in to comment.