Git Product home page Git Product logo

svelte-puzzle-8's Introduction

Svelte Puzzle 8 (1Q2024)

Note

School project made in the last year of High School

About

For this project I'm using SvelteKit as frontend and FastAPI as backend. The goal is to create a solver for the puzzle 8 game. The solver uses A* algorithm to solve the puzzle.

About puzzle 8

The game is simple, you have a 3x3 grid with 8 tiles and one empty space. You can move the tiles to the empty space and the goal is to get the tiles in order from 1 to 8 (Or any other configuration of your liking).

About A* algorithm

A* is a graph traversal and path search algorithm, which is often used in many fields of computer science due to its completeness, optimality, and optimal efficiency.

I'm not going to talk about the complexity and how it works, there are many great articles about it, for example this one, where there is more then enough information about it.

alt text

Technologies used

The project is initiated from my FastAPI + Svelte starter where you can learn more about the project structure.

Requirements:

Docker

docker build -t base:latest .
docker-compose up -d 

How to run

  1. Clone this repository
git clone https://github.com/OriginalStefikO/svelte-puzzle-8.git .
  1. If you want to run it locally, run setup script, otherwise build docker image and skip everything else
npm run setup-project
# This will create virtual environment, install python dependencies and install all npm dependencies
docker build -t svelte-puzzle-8 .
docker run -p 8080:8080 svelte-puzzle-8
  1. If running locally, you can choose to run it in development mode, production mode or just build all and run
npm run frontend-dev
# This will run frontend in development mode

npm run backend-dev
# This will run backend in development mode

npm run build-and-run
# This will build frontend, backend and run it

If you like it you can give me a star ⭐, check out my profile and other projects

Or you can buy me a coffee, a lot of it was sacrificed for this project :D

Buy Me A Coffee

License

Svelte Puzzle 8 solver by Ondřej Šteffan is licensed under CC BY 4.0

svelte-puzzle-8's People

Contributors

originalstefiko avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.