Insanity!

This project is a recreation of an interesting puzzle, which I found by chance at a flea market. The puzzle consists of a small wooden board with 10 holes in it, and 8 pegs (4 blue and 4 red). The 4 red pegs are placed in the leftmost holes, and the 4 blue pegs in the rightmost holes. The goal is to switch the colors; in other words, to move all the red pegs to the rightmost holes and the blue pegs to leftmost holes. Legal moves are moving a peg forwards one space, or jumping forwards over a peg. You can never move a peg backwards, i.e., in the direction of where it started.

I was inspired to create this digital version of it after finding little to no existing information about the puzzle online.

Technologies used: Javascript, HTML, CSS