Rush Hour puzzle online game and solver
This is my final project for Harvard's CS50x course. Since first half of the course focuses mainly on data structures and algorithms I've decided to expand on the topic of graph traversal algorithms.
Rush Hour is a sliding block puzzle invented by Nob Yoshigahara in the 1970s.
The board is a 6x6 grid which acts as a ground for multiple vehicles. Cars and trucks are both one square wide, but cars are two squares long and trucks are three squares long. Vehicles can only be moved along a straight line on the grid and rotation is forbidden.
The goal of the game is to get only the red car out through the exit of the board by moving the other vehicles out of its way. However, the cars and trucks (set up before play, according to a puzzle data) obstruct the path which makes the puzzle harder.
The database of puzzles comes from an amazing research project by Michael Fogleman.
npm start