sokoban_elements/saved_game/solving_mode.rs
1/// Game solving mode.
2#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Default)]
3#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4pub enum SolvingMode {
5 /// Forward solving mode
6 ///
7 /// - pusher is allowed to push single box at the time
8 /// - pusher can't pull boxes
9 /// - pusher can't jump over boxes or walls
10 #[default]
11 Forward,
12
13 /// Reverse solving mode
14 ///
15 /// When game is started, positions of box and goal are switched and game
16 /// starts in solved state.
17 ///
18 /// Pusher can only pull boxes, not push them. If position allows a pull,
19 /// that pull is optional (pusher is allowed to move without pull even if
20 /// pull is possible).
21 ///
22 /// Pusher is allowed to jump over boxes, walls and other pushers. Jumps are
23 /// allowed only before first box had been pulled.
24 ///
25 /// When game is started in reverse solving mode, pusher may end up standing
26 /// "on top" of a box. I that case first move for that pusher must be jump.
27 ///
28 /// Jumping after first pull can be optionally enabled if that helps
29 /// searching for board solution.
30 Reverse,
31}