Tic-Tac-Toe in Java deliberately over-engineered to apply features of Java introduced over time.
Developed to pair with the ongoing blog post: Road to JDK 25 - Over-Engineering Tic-Tac-Toe also serialized to Medium @ Road to JDK 25 - Over-Engineering Tic-Tac-Toe On Medium
https://openjdk.org/projects/jdk/23/
- JEP467: Markdown Documentation Comments
- JEP474: ZGC: Generational Mode by Default
- JEP471: Deprecate the Memory-Access Methods in sun.misc.Unsafe for Removal
https://openjdk.org/projects/jdk/22/
- JEP454: Foreign Function & Memory API
- JEP456: Unnamed Variables & Patterns
https://openjdk.org/projects/jdk/21/
- JEP431: Sequenced Collections
- JEP439: Generational ZGC
- JEP440: Record Patterns
- JEP441: Pattern Matching for switch
- JEP444: Virtual Threads
- JEP452: Key Encapsulation Mechanism API
https://openjdk.org/projects/jdk/20/
- No new features
https://openjdk.org/projects/jdk/19/
- No new features
https://openjdk.org/projects/jdk/18/
- JEP400: UTF-8 by Default
- JEP408: Simple Web Server
- JEP413: Code Snippets in Java API Documentation
- JEP421: Deprecate Finalization for Removal
https://openjdk.org/projects/jdk/17/
- JEP421: Deprecate Finalization for Removal
- JEP409: Sealed Classes
- JEP410: Remove the Experimental AOT and JIT Compiler
- JEP415: Context-Specific Deserialization Filters
The following algorithms are used by the AI BOT in this project - for a detailed discussion see Road to JDK 25 - An Algorithmic Interlude:
- Random See: Random.java
- Minimax See: Minimax.java
- Minimax w. Alpha-Beta See: AlphaBeta.java
- MaxN See: MaxN.java
- Paranoid See: Paranoid.java
- Monte Carlo Tree Search See MonteCarloTreeSearch.java
-
To run the single game application, use the following command:
./gradlew run
-
If you don't have Java 23 installed on your system you can install it first with SDKMAN:
curl -s "https://get.sdkman.io" | bash
sdk install java 23-tem
./gradlew run
- Over-Engineering Tic-Tac-Toe - CLI Run overengineered tic-tac-toe from the command line