sokoban-elements 0.2.1

Parsing and writing Sokoban, Hexoban, Trioban and Octoban file formats.
Documentation
/// Horizontal edge of a [`GameBoard`](crate::GameBoard): the edge rows are added to and removed
/// from.
///
/// Named after the orientation of the edge itself - the top of a board is a horizontal line.
///
/// # Examples
///
/// ```rust
/// use sokoban_elements::*;
///
/// let mut board = GameBoard::new(3, 3, Tessellation::Sokoban);
///
/// board.add_rows(HorizontalEdge::Top, 2);
/// assert_eq!(board.height(), 5);
/// ```
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub enum HorizontalEdge {
    Top,
    Bottom,
}

/// Vertical edge of a [`GameBoard`](crate::GameBoard): the edge columns are added to and removed
/// from.
///
/// Named after the orientation of the edge itself - the left side of a board is a vertical line.
///
/// # Examples
///
/// ```rust
/// use sokoban_elements::*;
///
/// let mut board = GameBoard::new(3, 3, Tessellation::Sokoban);
///
/// board.remove_columns(VerticalEdge::Left, 1);
/// assert_eq!(board.width(), 2);
/// ```
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub enum VerticalEdge {
    Left,
    Right,
}