Inspiration
We are always being told to avoid using nested for-loops, so we created tic-tac-toe with no for-loops. I hope you are happy.
What it does
The program creates a .c file that is a playable version of tic-tac-toe that uses only if statements to function. The file that is outputted is 4.5 million lines long, and accounts for all 500 000 possible game states.
How we built it
The first .c file simulates every possible game state, and determines if they are a tie or a win. Using this information the code creates a second .c file. This new c file uses if statements to navigate though every possible tic-tac-toe permutation to make a playable tic-tac-toe game.
Challenges we ran into
The 4.5 million line long file, very surprisingly, is too much for the average computer to handle. While technically runnable, the you would need some sort of super-computer to run this. We tried to compile the program for over an hour, before accepting defeat. Regardless, the file in itself is what we were hoping to achieve, and we are incredibly happy with the results.
Accomplishments that we're proud of
We have bested c in combat. Our code is so powerful even the best compilers have trouble running it.
What we learned
To never do this again
What's next for Tic-tac-toe 4.5 Million
Chess 10¹²⁰


Log in or sign up for Devpost to join the conversation.