|
1 | 1 | # Sudoku Checker
|
2 | 2 |
|
3 |
| -This project contains JavaScript functions for validating Sudoku puzzles by checking rows, columns, and 3x3 sections for the required values. It includes two sample puzzles for testing purposes. |
| 3 | +This project is a modern, interactive Sudoku Validator, designed to allow users to enter a complete Sudoku puzzle and validate its correctness. The interface mimics a game-like Sudoku grid with a clean, attractive look, making it easy and intuitive to use. |
4 | 4 |
|
5 |
| -## Overview |
| 5 | +## Project Overview |
6 | 6 |
|
7 |
| -The code provides utilities to: |
8 |
| -- Retrieve specific rows, columns, and sections from a Sudoku puzzle. |
9 |
| -- Validate that each row, column, and section contains the numbers 1 through 9 without duplicates. |
10 |
| -- Determine if a complete Sudoku puzzle is valid. |
| 7 | +The Sudoku Validator consists of three main files: |
11 | 8 |
|
12 |
| -## Installation |
| 9 | +- **`index.html`**: The core HTML structure that lays out the Sudoku grid, validation button, and result display. |
| 10 | +- **`style.css`**: The CSS file responsible for styling the Sudoku board, making it visually appealing, with clearly defined blocks, rounded corners, and responsive styles. |
| 11 | +- **`script.js`**: JavaScript logic to create the grid, collect the user inputs, and validate the correctness of the entire Sudoku puzzle. |
13 | 12 |
|
14 |
| -**Clone the Repository** |
15 |
| - - Start by cloning this repository to your local machine using the following commands: |
16 |
| - |
17 |
| - ```bash |
18 |
| - git clone <repository-url> |
19 |
| - cd <repository-directory> |
| 13 | +## Features |
| 14 | + |
| 15 | +- **Interactive Sudoku Grid**: The interface consists of nine distinct 3x3 sections stacked on top of each other, each containing nine input cells. |
| 16 | +- **Modern Design**: The grid has a game-like feel with rounded borders, soft colors, and hover effects to create an enjoyable user experience. |
| 17 | +- **Real-Time Validation**: Users can click the "Validate" button after entering their Sudoku puzzle to get immediate feedback on whether the puzzle is valid. |
| 18 | +- **Smooth UI Elements**: Focus and hover effects, smooth transitions, and a visually distinct validation button provide an interactive experience. |
| 19 | + |
| 20 | +## How to Use |
| 21 | + |
| 22 | +1. **Clone the Repository**: Clone the repository to your local machine using the following command: |
| 23 | + |
| 24 | + ```sh |
| 25 | + git clone https://github.com/FidelValenzuela/Sudoku-Checker |
| 26 | + ``` |
| 27 | + |
| 28 | +2. **Open the HTML File**: Navigate to the project directory and open the `index.html` file in your preferred web browser. |
| 29 | + |
| 30 | +3. **Input the Puzzle**: Enter the numbers into the Sudoku grid. You can use numbers from 1 to 9 in each cell. The grid is divided into nine stacked 3x3 sections. |
| 31 | + |
| 32 | +4. **Validate the Puzzle**: Once you have filled out the entire Sudoku grid, click the "Validate" button. A message will appear below indicating whether the Sudoku puzzle is valid. |
| 33 | + |
| 34 | +## Project Files |
| 35 | + |
| 36 | +- **`index.html`**: Defines the HTML structure and includes references to the `style.css` and `script.js` files. |
| 37 | +- **`style.css`**: Provides the styling for the Sudoku board, including colors, padding, grid layout, button styling, and result messages. |
| 38 | +- **`script.js`**: Contains the JavaScript code for dynamically creating the Sudoku grid, retrieving the user inputs, and validating the puzzle. |
| 39 | + |
| 40 | +## Code Structure |
| 41 | + |
| 42 | +- **Grid Generation**: The JavaScript code dynamically generates a 9x9 Sudoku grid by creating 9 separate 3x3 blocks. Each block contains 9 cells for user input. |
| 43 | +- **Validation Logic**: The validator checks if each row, column, and 3x3 section contains all the numbers from 1 to 9 exactly once. |
| 44 | +- **Result Display**: After clicking the "Validate" button, the JavaScript function displays whether the Sudoku puzzle is valid or invalid, with different colors for better visual distinction. |
| 45 | + |
| 46 | +## Styling |
| 47 | + |
| 48 | +- **Modern Game-Like UI**: The project uses rounded corners, soft background colors, and hover effects to give the interface a polished look. |
| 49 | +- **Responsive Layout**: The layout is centered on the page, with flexible sizing to adapt well on different screen sizes. |
| 50 | + |
| 51 | +## Future Improvements |
| 52 | + |
| 53 | +- **Error Highlighting**: Highlight incorrect cells when the puzzle is invalid, helping users identify where the issues are. |
| 54 | +- **Partial Validation**: Allow users to partially validate rows or columns while filling out the Sudoku puzzle. |
| 55 | +- **Mobile Optimization**: Improve mobile usability by refining the input experience for small touchscreens. |
| 56 | + |
| 57 | +## Requirements |
| 58 | + |
| 59 | +- Any modern web browser (Chrome, Firefox, Safari, Edge). |
| 60 | +- Basic knowledge of Sudoku to input a complete puzzle for validation. |
| 61 | + |
| 62 | +## Credits |
| 63 | + |
| 64 | +This project was created as an example of modern web design and JavaScript validation. It showcases how to build an interactive and visually appealing Sudoku validator. |
| 65 | + |
| 66 | +## License |
| 67 | + |
| 68 | +This project is open source and available under the MIT License. Feel free to use and modify it as needed. |
| 69 | + |
| 70 | +--- |
| 71 | + |
| 72 | +Thank you for checking out the Sudoku Validator! If you have suggestions or improvements, feel free to contribute or open an issue. |
| 73 | + |
| 74 | +\ |
0 commit comments