▲ 114 ▼ Implementing Tic Tac Toe with 170mb of HTML - no JS or CSS (portswigger.net) submitted 2 years ago by mac@programming.dev to c/programming@programming.dev 26 comments fedilink hide all child comments
[–] kogasa@programming.dev 12 points 2 years ago* (1 child) Some of those boards are impossible, and there are multiple ways to get to most of them, so you only need maybe half of that. There are 5,478 possible valid boards in total if you allow the computer to play any legal move. permalink fedilink source parent hideshow 2 child comments replies: [–] Treczoks@kbin.social 6 points 2 years ago As I described, I'd need way fewer, as the optimal computer counter-move would already be included in the next board. So if you placed your X in the top left field in the starter image, the link would directly go to a field with the X in the top left, the O in the center position, and links in all the remaining seven positions. And of course the pre-calculation will eliminate some of the boards already, e.g. if the player or computer already won after the third move, where placing a fourth will not make sense. permalink fedilink source parent
[–] Treczoks@kbin.social 6 points 2 years ago As I described, I'd need way fewer, as the optimal computer counter-move would already be included in the next board. So if you placed your X in the top left field in the starter image, the link would directly go to a field with the X in the top left, the O in the center position, and links in all the remaining seven positions. And of course the pre-calculation will eliminate some of the boards already, e.g. if the player or computer already won after the third move, where placing a fourth will not make sense. permalink fedilink source parent