General Sokoban information
From Sokoban Wiki
(→Moves parity) |
(→Moves parity: example level) |
||
Line 10: | Line 10: | ||
The reason for this is that the player can only move up, down, left and right: | The reason for this is that the player can only move up, down, left and right: | ||
+ | |||
[[File:MoveParityExampleWithCheckerboardOverlay.png]] | [[File:MoveParityExampleWithCheckerboardOverlay.png]] | ||
+ | in the above picture, the squares are alternately colored. | ||
+ | With every move the player moves to a square of the other color, no matter how the player moves. | ||
+ | This means all darker squares are reached with an odd number of moves and all brighter squares are reached with an even number of moves. | ||
+ | Since the player start position is fixed for every level the move parity only depends on the end position of the player. | ||
+ | |||
+ | This information is sometimes useful, since for certain levels it may be helpful to now where the player ended. | ||
+ | For example Original level 12: | ||
+ | |||
+ | [[File:Original12.png]] |
Revision as of 21:22, 23 January 2023
Moves parity
The parity of the number of moves of a solution depends on the position of the player when the level has been solved.
Example:
In this level the move parity is always even when the level has been solved, no matter how the player is moved, since the player must always end at the position left to the box.
The reason for this is that the player can only move up, down, left and right:
in the above picture, the squares are alternately colored. With every move the player moves to a square of the other color, no matter how the player moves. This means all darker squares are reached with an odd number of moves and all brighter squares are reached with an even number of moves. Since the player start position is fixed for every level the move parity only depends on the end position of the player.
This information is sometimes useful, since for certain levels it may be helpful to now where the player ended. For example Original level 12: