Hacker News new | ask | show | jobs
Making a tic-tac-toe game with ‘randomness’ using pure HTML and CSS (blog.scottlogic.com)
35 points by Garora 751 days ago
6 comments

The random function doesn’t seem to work on mobile Safari. Hitting the “random” button does nothing.
Ah, random opponent. From the headline I was expecting something like Incomplete Information Tic-tac-toe https://www.smbc-comics.com/comic/incomplete
Nothing happens when I click anywhere in Firefox 115 on MacOS.
:has() syntax was recently supported in Firefox 121:

https://developer.mozilla.org/en-US/docs/Web/CSS/:has

Works great on Firefox 126 on MacOS, you need to upgrade!
oh crap, I guess my OS is too old
Tic-tac-toe tech marches onward, with or without you.
we should not be throwing the word "random" around so loosely. this is pseudo randomness. The fact that it is only pseudo random should be mentiond in the writing.
Why should it? It’s clearly an article about doing neat things with CSS, not the technicalities of different degrees of randomness. Perhaps we should not be throwing around the word “should” so loosely…
It’s a toy tic-tac-toe game with no monetary or life threatening implications, no need to bring the security mindset into this discussion.

If someone copies this code and uses it in a non-toy application, well, that’s on them.

Sorry, we’ll be sure to only mention cryptographically strong tic-tac-toe games in the future.
The word "randomness" in the title is in quotation marks, which seems like a pretty clear indication that it's not referring to true randomness but to something random-like.
Did it have to look so ugly?
Next week: making a tic-tac-toe game look decent using JavaScript.
How am I going to make it look good? I dont have the CSS skills for that
Mine looks great https://go-here.nl/ai/

lol

This is going take me a while to read and understand, but the concept is insane