/Tic-Tac-Toe-java

All details in README.md

Primary LanguageJava

ITI-Tic-Tac-Toe-Game

forthebadge forthebadge

it is a relatively simple game usually played on a grid of 3-by-3 squares, tic-tac-toe is enjoyed by children and even adults which may be played online with other user or offline the computer and even to choose the mode whether easy, medium or hard by implementing some AI algorithms and in this project, we introduce another experience in tic tac toe by implementing attractive GUI with relaxation music to gain the users attentions.

Getting Started

this project is to develop a Tic-Tac-Toe game for desktop devices. The game is supposed to consist of three parts, one a single player game a player against a system, two players in the same pc, and the other a multi-player game (two players on their desktop devices, playing against each other). In order to accomplish these, the following objectives were defined.

Single player mode
  • The player should play Tic-Tac-Toe game on his desktop device.
  • The player should have option to enter his name or not.
  • The player should have option to record the game or not.
  • The player should select the mode easy, medium or hard.
  • The score of games will be displayed in front of the user and computer name.
  • If the player X marked horizontally or vertically or diagonally of his symbol in a row, then the player X won that small match.
  • After winning or losing the game there will be a small video that shown to the winner as congratulations and such as good luck video for loser and the score will be updated.
  • User is able to start new game whenever he wants even if he is in the middle of game.
Multi player mode #### (Two players in the same pc)
  • The players should play Tic-Tac-Toe game on single desktop device.
  • The players have option to enter their name or not.
  • The players have option to record the game or not.
  • By default, player 1 is X and O has allotted to player 2 automatically and vise verse for the next game.
  • The main game grid has to display in the device.
Online mode
  • Using Network as communication channel the two players should play TicTac-Toe game from different devices by entering server is.
  • Players should have log in by enter his username and password.
  • Also, there is another option if player don’t have an active account to register by enter his/her first, second and user name, password and gender.
  • player can send invitation to online player by pressing on their name on the list to play against them, once he accepts the request both of them will became unavailable to other players until the game ends or one of them ends it note that the available players list refreshes automatically every 5s.
  • And now the main game grid has to display in both devices.
  • By default, player 1 is X and O has allotted to player 2 automatically and vise verse for the next game.

The Server App




Online mode



Note that:

  • All records are saved locally on the device.
  • The screen size is fixed and user is not able to change the size.
  • There is back button in every page that leads the user to the previous page.
  • There is music that is running in the background after opening the game.
  • There is sound button in every page which enable the user to turn off the sound or put it on again.
  • to view your records there is a rec button in the main menu user is able to press on and their will be list of the recorded matches.
  • At the main menu there is a button for about information.
  • At the main menu there is a button exit the game.


Finally we hope you enjoy playing the game.