Coders Packet

Tic-Tac-Toe Game using Java

By Vipul Rajesh Chandankar

This is a simple Tic-Tac-Toe game developed in Java using the Function, Array, and Conditional and Logical operator.

Tic-Tac-Toe game is usually played between two-player that namely 'X' and 'O'. I created a Tic-Tak-Toe game using Java with the use of Array, Function, Conditional and Logical operators.

At the very first step I display a game Board numbered from 1 to 9, the First turn is always of X's and after that, there is O's turn. Any player needs to choose a box that is numbered, as the user chooses any box then the box number is changed with a particular user's name i.e, 'X' or 'O'.

If a user tries to choose any box which is already acquired then a proper message related to that incident is displayed. like "Slot already taken :(".

If any user is able to cover the row, column, or diagonal then that user is the Winner, and it is displayed by "Congratulations! You are the Winner :)"

Download project

Reviews Report

Submitted by Vipul Rajesh Chandankar (VipulChandankar)

Download packets of source code on Coders Packet