Challenge accepted: https://github.com/Letdown2491/josephs-squares
Discussion
Is there a live version to try?
no live version, but if you go to the github repo, go in the public folder and download spa.html. you can just open that file in your browser to play.
You can use Google Pages to offer a live version, or use githack:
https://raw.githack.com/Letdown2491/josephs-squares/main/public/spa.html
s/Google/Github/
I think there should be at least *some* pathfinding, drawing the lines exactly straight doesn't seem in the spirit of the game
This is pretty good, but yes, without some pathfinding around the squares and avoiding existing lines it doesn't work: nostr:nevent1qvzqqqqqqypzqwlsccluhy6xxsr6l9a9uhhxf75g85g8a709tprjcn4e42h053vaqydhwumn8ghj7un9d3shjtnhv4ehgetjde38gcewvdhk6tcprfmhxue69uhhq7tjv9kkjepwve5kzar2v9nzucm0d5hsqgpajvm0wm6rxyxk39nggefyav3ggce0zksn9ja7pz737pt8r5jnzqtlh2ca
You're 100% right. Default is now freeform form so you can draw your lines. Repo updated. Now to have it so lines cannot go through a square.
Looking pretty good, now just some more space around and between the squares (maybe shrink the squares a little?), disallow going through the square and make the computer recognize a win condition and that should be it.
Ok just updated so you can't put lines through squares, a game over state is more evident, and added dark mode for the heck of it.
Nice, but there is a bug:

Classic, everybody always tries to do this.
Fixed...you try this it calls you a cheater lol
Hahaha
But player B can always win, or am I missing something?

with two squares i'm pretty sure player B always wins lol
This was a great solution, although I have no idea how it could be implemented.
Same for the code that decides who won. I was almost amazed at it when it committed a mistake:

By the way, if you get back to it, I think we need more space around the squares still (and smaller squares).
That's probably a mistake in how path spacing is detected. I've run into this a couple of times getting too close to a square and it thinks I tried to go through the square. I'm sure with some fine tuning it can get the math right.
And yeah, def need more game board space.