demm42's WebSite - Puzzle

demm42's E-mail : mail09.gif


I've been reading a book of mind bending puzzles, and this one had me intrigued. Basically you have a row of 7 places, with 3 different coloured counters at each end. What you have to do is move the red counters to the right and the blue counters to the left. Now as you can imagine, doing this with counters can bug after a bit, as the object of the exercise is to do it in 15 moves.

So the programmer in me came out, and I wrote this quick web page to simulate the puzzle. Now I'm not an expert in Javascript, but it gave me a chance to test how much I've come on in the 12 months since I first launched this website. I hope the Javascript in it gives as much reference for other people getting into web programming as I have found on other pages on the internet.

So here are the rules:

  • Counters can jump over another counter into the blank spot or move into the blank spot when it's next to them. Click on the counter to move it.
  • It can be done in 15 moves.
  • You can start again by pressing the reset button.


Red Counter

Red Counter

Red Counter

Blank Counter

Blue Counter

Blue Counter

Blue Counter

Moves made: 

 

I'll add some more puzzles as I come across them.

 mail09.gif