Skip to content

Murf-o/PuzzleSolver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PuzzleSolver

Maven Project, React JS, and Java Spring Boot. I have a machine on AWS EC2 that runs this, currently off to avoid costs. More than glad to turn it on if needed, or you can of course just clone this repo!

This program is able to give you the best solution to your sliding block puzzle! Algorithm used to achieve this: Breadth-First-Search.

A user is able to create a puzzle using the front-end or is able to import their own. The rules on how to play are displayed on the front-end The back-end serves requests from the front-end.

Client folder contains code for the front-end, created using React JS. To run it, run "npm start" in a terminal inside the my-app folder.

The src folder contains all java related things, such as the spring-boot application and the logic of the game. To run the server, you can simply run PuzzleSolverApplication.java or you can convert it to a jar file using maven commands and then run the jar file.

using maven commands:

mvn package java -jar target\PuzzleSolver-0.0.1-SNAPSHOT.jar Important Note: The server saves data to a MySQL database. To connect to your table, go to the resources folder and into the application.properties file-- insert your username and password, make necessary changes (port etc) There is one table named "puzzles" with columns as follow: -Id: bigint -initial_grid: varchar(3000) -final_grid: varchar(3000) -moves: varchar(3000) -warnings: varchar(3000) -solvable: bit(1) -row_size: int -column_size: int -to_string: varchar(3000)

You don't need the database to run the server, it's already commented out, feel free to put it back in and do whatever you'd like with it. Thank you!

Author: Sebastian Barroso

About

Created a REST API, using Java Spring Boot, that solves sliding block puzzles given to it. Front-end not needed to make calls to it. With that, the front-end is made in React.js and allows users to create/import puzzles themselves! The API returns the solution as well as the move-set. That being said, It looks much prettier on the front-end!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors