Dev Tools · 1h ago
Developer builds guaranteed-winnable Mahjong by reversing the deal
A developer created a Mahjong solitaire game that guarantees every board is winnable by generating the solution first, then deriving the board. Traditional random dealing often produces unwinnable layouts, frustrating players. The approach simulates a legal removal order on an empty layout and assigns tile pairs to that order.
Meridian48 take
Clever algorithmic fix for a common UX pain point, but the real insight is how often 'obvious' implementations ship broken by default.
Read the full reporting
Most free mahjong games can deal you a board you can't finish. I built mine backwards. →
DEV Community
game-developmentalgorithm-design