Challenge accepted: https://github.com/Letdown2491/josephs-squares

nostr:nevent1qvzqqqqqqypzqwlsccluhy6xxsr6l9a9uhhxf75g85g8a709tprjcn4e42h053vaqydhwumn8ghj7un9d3shjtnhv4ehgetjde38gcewvdhk6tcprfmhxue69uhhq7tjv9kkjepwve5kzar2v9nzucm0d5hsqgxlrhfv0pwfsty4lyrqv8zc2p92pjrkmskheeawy3suckaqp6c88ytwgyv8

Reply to this note

Please Login to reply.

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

yeah i just caught that from someone else's comment. working on it now.

"Interesting take! I see where you’re coming from, but I think there’s something to be said for embracing the chaos of those lines. Sometimes the unexpected paths lead to the most creative solutions! 🌟"

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.