Tic-tac-toe in a single call to printf
A C implementation of a tic-tac-toe game, created for the 2020 International Obfuscated C Code Contest, features highly obfuscated code using a single `printf` statement and checks for game conditions.
Read original articleThe GitHub repository features a C implementation of a tic-tac-toe game, notable for its highly obfuscated code that utilizes a single `printf` call. Created for the International Obfuscated C Code Contest (IOCCC) in 2020, the project exemplifies advanced techniques in format string manipulation. The game allows two players to take turns entering digits from 1 to 9 to make their moves, while the code checks for wins, ties, and illegal moves. The obfuscation techniques employed include various format specifiers and tricks that manipulate memory and control flow, illustrating the concept of "printf-oriented programming." To use the program, users must compile the code with `gcc` and then run the executable. The game displays a tic-tac-toe board and prompts players for their moves, checking for winning conditions or ties after each turn. The code is licensed under GPL v3, permitting redistribution and modification under specified conditions. This project serves as an intriguing example of creativity in C programming, particularly for those interested in programming challenges or obfuscated code.
- The tic-tac-toe game is implemented in a single `printf` statement.
- It was created for the 2020 International Obfuscated C Code Contest.
- The game checks for wins, ties, and illegal moves during play.
- The code is licensed under GPL v3, allowing for redistribution and modification.
- It serves as a creative example of obfuscated programming techniques.
Related
Let's write a video game from scratch like it's 1987
Philippe Gaultier created Minesweeper in 1987 using X11 without libraries, resulting in a compact executable. The article explores X authentication, Odin language usage, and minimalistic GUI development, offering insights into X11 intricacies. Source code is on GitHub.
Wc2: Investigates optimizing 'wc', the Unix word count program
The GitHub project "wc2" presents an innovative algorithm for the `wc` program, focusing on asynchronous state-machine parsing in C and JavaScript. It enhances efficiency, scalability, and speed compared to traditional `wc` implementations.
Weekend projects: getting silly with C
The C programming language's simplicity and expressiveness, despite quirks, influence other languages. Unconventional code structures showcase creativity and flexibility, promoting unique coding practices. Subscription for related content is encouraged.
Put the DVD logo in the corner (2023)
A small arcade game, "Put the DVD Logo in the Corner," was created in four days using the PICO-8 engine. Its simplicity, strong theme, and developer's positive experience hint at future game development.
Exercise: Minesweeper in 100 lines of Ruby
Radan Skorić implemented Minesweeper in 100 lines of Ruby code, emphasizing code reduction while maintaining readability. The implementation covers board generation, gameplay logic using Ruby features, and hints at future multiplayer functionality.
https://www.usenix.org/conference/usenixsecurity15/technical...
Related
Let's write a video game from scratch like it's 1987
Philippe Gaultier created Minesweeper in 1987 using X11 without libraries, resulting in a compact executable. The article explores X authentication, Odin language usage, and minimalistic GUI development, offering insights into X11 intricacies. Source code is on GitHub.
Wc2: Investigates optimizing 'wc', the Unix word count program
The GitHub project "wc2" presents an innovative algorithm for the `wc` program, focusing on asynchronous state-machine parsing in C and JavaScript. It enhances efficiency, scalability, and speed compared to traditional `wc` implementations.
Weekend projects: getting silly with C
The C programming language's simplicity and expressiveness, despite quirks, influence other languages. Unconventional code structures showcase creativity and flexibility, promoting unique coding practices. Subscription for related content is encouraged.
Put the DVD logo in the corner (2023)
A small arcade game, "Put the DVD Logo in the Corner," was created in four days using the PICO-8 engine. Its simplicity, strong theme, and developer's positive experience hint at future game development.
Exercise: Minesweeper in 100 lines of Ruby
Radan Skorić implemented Minesweeper in 100 lines of Ruby code, emphasizing code reduction while maintaining readability. The implementation covers board generation, gameplay logic using Ruby features, and hints at future multiplayer functionality.