Tag
#games
7 articles tagged games.
Chess LLD: Scope Like a Senior, Move Like a Strategy Pattern
A low-level design walkthrough of chess: scoping the unbuildable, one movement rule per piece via the Strategy pattern, a shared path-clear helper for sliding pieces, and the complete implementation.
Tetris LLD: One Collision Check Runs the Whole Game
A low-level design walkthrough of Tetris: why the falling piece never lives on the board, rotation as pure arithmetic, line clears as a filter, and the complete implementation of the classic.
Jackpot Machine LLD: Reels, a Paytable, and Money That Never Lies
A low-level design walkthrough of a jackpot slot machine: independent reels with injected randomness, the paytable as data instead of if-chains, and a credits ledger that always balances.
Minesweeper LLD: Two Grids, One Flood, and a Merciful First Click
A low-level design walkthrough of minesweeper: separating truth from view, the flood fill cascade done with discipline, first-click safety, and the complete implementation of the classic.
2048 LLD: One Merge Function Wearing Four Costumes
A low-level design walkthrough of the 2048 game: the merge-once rule everyone breaks, why all four directions are one mergeLeft function, win and lose detection, and the complete implementation.
Snake & Ladder LLD: One Map, One Die, and a Game You Can Test
A low-level design walkthrough of snake and ladder: why snakes and ladders are one Map, how injecting the die makes the game testable, and the complete implementation with a clean turn loop.
Tic-Tac-Toe LLD: The Warm-Up Interview You Should Never Lose
A low-level design walkthrough of tic tac toe (Tic-Tac-Toe): an O(1) win check with counters, a clean state machine, and the complete implementation of the classic warm-up interview question.