kevinngkaion / SudokuGame

A sudoku game in JavaScript

Home Page:https://sudoku-game-rho.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SudokuGame

A Sudoku game in JavaScript

This was made using a RESTful Express.js API and a React front-end. To generate new boards, the API takes a difficulty string in the url parameter and reads a .txt file as a seed to the sudoku puzzle. The API then performs a series of transformations on the puzzle to produce a seemingly new puzzle.

The transformations done on the puzzle include:

  • Mapping numbers (eg. all '1s' become '3s' and all '2s' become '8s')
  • Rotating the board
  • Shuffling rows and columns

Table of Contents

Installation

  1. Check if you have Node.js installed. If you do not have node installed, follow the directions at https://nodejs.org/en
$ node --version
  v18.15.0
  1. Copy the files from this github repository by downloading the zip file or by running the git clone command
$ git clone https://github.com/kevinngkaion/SudokuGame.git
  1. cd into the project directory and then into the backend directory
$ cd directory_where_game_was_copied_to/SudokuGame/sudoku/backend
  1. Install the neccessary dependencies for the Express API
$ npm install
  1. Run the express server
$ npm start
  1. In a new terminal, cd into the project directory
$ cd directory_where_game_was_copied_to/SudokuGame/sudoku
  1. Install the neccessary dependencies for the React app
$ npm install
  1. Run the react app
$ npm start

Usage

SudokuScreenShot

  • Solve the puzzle by entering your answers in the available cells
  • Check if your answers are correct by clicking the 'check' button below the board. Correct answers will change colour and can no longer be changed
  • If you get stuck, you can solve the puzzle by clicking the 'solve' button
  • Reset the board back to the original puzzle by clicking the 'reset' button
  • Get a new puzzle by clicking one of the buttons above the board. You can select the puzzle difficulty as well

License

This project is licenced under the GNU General Public License v3.0

About

A sudoku game in JavaScript

https://sudoku-game-rho.vercel.app

License:GNU General Public License v3.0


Languages

Language:JavaScript 81.2%Language:HTML 9.9%Language:CSS 8.9%