Skip to content

🎮 3D Tic-Tac-Toe game on 4x4x4 cube | Player vs Player & AI modes | Strategic gameplay in three dimensions

Notifications You must be signed in to change notification settings

EgeGermen/TicTacToe3D

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

3D Tic-Tac-Toe

Author: Ege Germen

About The Game

This project is a Java-based implementation of Tic-Tac-Toe in a three-dimensional 4x4x4 grid. It's a console application that brings a new layer of strategy to the classic game.

Features

  • Three-Dimensional Gameplay: The game is played on a 4x4x4 cube, requiring players to think in 3D to secure a win.
  • Player vs. Player Mode: Challenge a friend in a local hot-seat match.
  • Player vs. AI Mode: Play against a computer opponent. The AI makes random moves, providing a fun and unpredictable challenge.
  • Turn Selection: You can choose to go first (playing as 'X') or second (playing as 'O').
  • Complete Win Detection: The game checks for winning conditions in every possible direction—horizontally, vertically, and across all 3D diagonals.

How to Play

  1. Compile the Java code:

    javac TicTacToe3D.java
  2. Run the game:

    java TicTacToe3D
  3. The game will prompt you to choose your opponent (Human or Computer).

  4. You will then be asked if you want to make the first move.

  5. To make a move, enter the row, column, and depth (0-3 for each) separated by spaces. For example:

    1 2 3
    
  6. The first player to get four of their marks in a row wins!

About

🎮 3D Tic-Tac-Toe game on 4x4x4 cube | Player vs Player & AI modes | Strategic gameplay in three dimensions

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages