A Sudoku validation game built with vanilla JavaScript. Play locally or online at matheuspolicamilo.github.io/sudoku.
Sudoku is a logic puzzle created by Howard Garns. The goal is to fill a 9×9 grid so that each row, column, and 3×3 region contains the digits 1–9 exactly once. This project implements a playable Sudoku board with real-time validation that highlights cells with incorrect values.
- Interactive 9×9 Sudoku board
- Real-time validation (invalid cells highlighted in red)
- Click to select a cell, then choose a number (1–9) or erase
- Reset button to start over
- Object-oriented design (
SudokuandValidatorclasses) - Built with ES6, Lodash, HTML & CSS
- A modern browser with ES6 support
- No build step required
-
Clone the repository:
git clone https://github.com/MatheusPoliCamilo/sudoku.git cd sudoku -
Open
index.htmlin your browser, or serve the folder with any static file server.
Lodash is loaded via CDN in index.html:
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lodash.min.js"></script>- Click a cell to select it (highlighted in blue).
- Click a number (1–9) below the board to place it in the selected cell.
- Click the eraser icon to clear the selected cell.
- Click the reset icon to reload the puzzle.
- Invalid cells (duplicates in row, column, or block) are highlighted in red.
sudoku/
├── index.html # Board markup, styles, and UI
├── script.js # Sudoku logic, validation, and event handlers
└── README.md
- JavaScript (ES6) – Game logic and OOP
- Lodash – Array utilities (
_.without,_.uniq,_.find, etc.) - HTML & CSS – Layout and styling
- GitHub Pages – Static hosting
Matheus Poli – LinkedIn
