Screen.Recording.2023-07-03.at.19.14.58.mov
Clone the repo
git clone [email protected]:edwilson543/sudoku.git
cd sudoku
Copy the example .env files
cp frontend/.env.example frontend/.env
cp backend/sudoku/.env.example backend/sudoku/.env
In frontend/.env
comment out on of the with / without docker sections as relevant
- postgres 14.9
createdb sudoku
- Docker 20.10.20
docker-compose build
docker-compose up
- Python 3.11
- Node 18.16
Backend:
cd backend
python -m venv venv
source venv/bin/activate
pip install -r requirements/app-requirements.txt
python manage.py migrate
Frontend:
cd frontend
npm install
In one shell:
cd backend
python manage.py runserver 8000
In another shell:
npm start
Then visit your localhost to play.
There's also a django admin which shows all players, games, sudokus and game moves.
- React for the frontend
- Django for the backend
- Django REST framework for the API allowing them to communicate
- Gameplay
- Make, erase & undo moves
- Validation mode (highlights incorrect guesses when turned on)
- Play sudokus of different sizes and varying difficulties
- Light & dark themes
- Backend
- Sudoku solver using integer programming
- Sudoku generation - the algorithm I came up with is:
- Randomly shuffle a solved sudoku, ensuring the solution remains valid
- Randomly remove a certain number of clues
- Attempt solving the sudoku and check that the solution is unique
- Player identification
- Persistence of current game state and historic games