Skip to content

darshan1328/TicTacToe_game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 

Repository files navigation

TicTacToe_game

Introduction 💻

This project is a console-based implementation of the classic Tic-Tac-Toe game in Java. It allows Two players as well as Single player to play the game on the same console, taking turns to place their markers ('1' or 'O') on a 3x3 grid. The game notifies players of their turn, checks for win conditions after each move.

Features

▶️ Console-based: Entirely text-based with no graphical user interface.

▶️ Two-player: Supports two players taking turns.

▶️ Win Condition Detection: Checks for winning combinations after each move.

▶️ Error Handling: Handles invalid inputs and prevents illegal moves.

▶️ Computer Algorithm Opponent: Test your skills against the computer algorithm, which employs strategic moves based on game conditions.

Technologies Used

Java: Core programming language.

Git: Version control system.

GitHub: Hosting repository and project documentation.

image image

Installation

  1. Clone the repository: https://github.com/darshan1328/TicTacToe_game.git
  2. Open a new Project in IDE > Project from VCS
  3. In the src file, you can find the code
  4. Run the Main.java in your ide

🔦 Usage

Gameplay Instructions: 🔴 🟡 🟢

➡️ Players are prompted to enter their moves by specifying the row and column of the grid (rows are numberede :0,1,2 and column are numbered: 0,1,2)

➡️ The game alternates turns between Player 1 and Player 0.

➡️ The game ends when a player wins or when the board is full (resulting in a draw).

➡️ Input Format: Players should input their moves in the format '1' or '0'.

➡️ For Single Player mode: You can input '1' when the Game asks you to input.

Latest Update

I am excited to introduce Single-Player Mode with Computer Algorithm to my Tic-Tac-Toe game! Now, you can enjoy a challenging game against our computer opponent, designed to provide a competitive and enjoyable experience.

image

Future Improvements

🚩 Graphical Interface: Develop a graphical user interface (GUI) using JavaFX or Swing.

🚩 Enhanced Algorithm : Improve the difficulty level for Single-Player mode.

🚩 Bringing Leaderboard concept which will be ranking the players in the Single-Players mode.

About

A simple TicTacToe game developed using java

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages