Like A Bridge Over Troubled Water

I have added "actually finish stuff" to the list of things I'm going to try to get better at so it is with a little bit of pride that I announce my very nearly finished little game I call "Bridges" but is actually called Hashiwokakero originally published, I think, by Nikoli.

It's a little puzzle where you have to connect islands with bridges. There are a few rules, but it's pretty simple. Inspired by the latest LinkedIn games and a little puzzle block I was given by Unit Digital for my birthday, I decided to have a go at making a JavaScript version of the game. It was a lot of fun to build, and I mostly did it without relying on Ai. When I did use it, it was for things like a few DocBlocks that Ai wrote for me, and sometimes I asked an agent what might be the best approach, almost like a Dev Buddy rather than a Coder.

It's probably not a very mature code example, and I am pretty sure there will be some repetition and variations in methods as I tried different stuff out, or forgot what I'd already done, but it works. There are functions that check positioning for bridges, add elements to SVGs for the graphics, and allow you to check your answer once you think you're done.

At the moment there are only a limited number of puzzles in there, and I'm going to try to work out a way to use a puzzle api or generator or something so I don't have to make the puzzle / solution arrays. Also, the solutions aren't hidden in any way so if you dig in Developer Tools you'll find them.

This is very much a bit of code that I've enjoyed doing, and worked on the theory that the best way to get better at developing is to develop.

Take a look if you want. It's on my site here.

The next game on my Code To Play List: Battleships.