/AngularSudoku

Building a sudoku game in Angular

Primary LanguageTypeScript

AngularSudoku

This is a project to create a Sudoku game using Angular. To run the project locally, follow these steps:

  1. Clone the repository from GitHub.
git clone https://github.com/xocomil/AngularSudoku.git
  1. If you have volta installed, then the node version is already pinned.
  2. We use pnpm as the package manager, so use that to install dependencies.
pnpm install
  1. We use nx to manage the project, so use that to launch the application.
pnpm nx serve
  1. Navigate to http://localhost:4200/ in your browser to see the Sudoku game.

Screenshot 2024-02-22 181914.png

Features

  • Column, row, region and error highlighting
  • Validate the board
  • Solve a Sudoku puzzle using wave-function collapse
  • Full undo/redo functionality
  • Puzzle mode to enter your own puzzles
  • Includes full keyboard support including arrow key navigation, w, a, s, d for navigation, and 1-9 for entering numbers
  • Includes a11y support including support for screen readers, tab key and escape key navigation

Testing

Unit Tests

Unit tests are done with nx and jest. To run the unit tests, use the following command:

pnpm nx run-many --taget=test

Component Tests

Component tests are done with nx and cypress. To run the component tests, use the following command:

pnpm nx run-many --target=component-test

Storybook

There is a storybook for the components. To run the storybook, use the following command:

pnpm nx storybook components