Sudoku Solver

Back to Projects →

Introduction & Problem Statement

Solving a Sudoku Puzzle on paper takes the average person 7 - 8 minutes; it would be more convenient to find the solution of a sudoku puzzle in less time.

Current Solution/System

Sudoku puzzles are solved by hand and take too long.

Proposed Solution/System:

Create a computer application that can solve a Sudoku puzzle within seconds or microseconds.

Project Objective

Create an application using HTML, CSS, and JS to solve incomplete sudoku puzzles.

Project Goals

Demonstrate and improve on the following skills and abilities:

  • Javascript
  • HTML
  • CSS
  • UI Design
  • UX Design
  • Software Development Practices (Lifecycle Activities)
  • TODOs
  • Modify App Theme
  • Refine "application domain" paragraph
  • Create hover effects for use-case cards
  • Clean use-case diagram
  • Color systems on object diagram
  • Move Implemented design pattern below dynamic models - add propagation notes

Application Domain

Before we start building the project, we must ask how will it work? how will it be used? The designer(s) answer these questions and elicit project requirements by determining the product/project's use cases.

Use Cases (Requirement Elicitation)

Use cases include:

  1. Edit/Input Puzzle
  2. Load Existing Puzzle
  3. Solve Puzzle
  4. Restore Puzzle

Use Case Descriptions

Analysis and Synthesis

Once the use cases have been determined, the designer(s) have an idea how the app will work and what parts are needed. Static and Dynamic models are developed from information discussed in the use case descriptions, testing and further code refinement.

Static models represent the components and systems of the project - answering "what" and dynamic models represent how those components and systems will work when the project undergoes user interactions

The following static and dynamic models were created using the use case descriptions, testing and code refinement. The models below are the final/current depictions of the sudoku solver app.

Static Models

Class / Object Diagram

Implemented Design Patterns

  • Composite
  • Observer / Subscriber
  • Singleton

Dynamic Models

The observer pattern was used to propagate the global app state to each UI component

all user events were defined at the component level but called global level functions to reduce coupling

App State Diagram

Solution Domain

Object Refinement and Interfacing

Solver.js Solving Algorithm

solvePuzzle(puzzle)
solveUsingMethod(method)