Skip to content

Tic-Tac-Toe game using Java FXML following MVC Model Architecture

Notifications You must be signed in to change notification settings

D-Kumar19/Tic-Tac-Toe-using-MVC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Strategic Squares: A Twist on Classic Tic-Tac-Toe

Strategic Squares breathes new life into the timeless competition of Tic-Tac-Toe, presenting a classic challenge with modern twists. Designed for two players, this game expands the traditional three-by-three grid, offering dynamic gameplay, strategic depth, and multiple paths to victory. Prepare for a battle of wits, where only the most cunning can claim victory.

Overview

  • Gameplay Essence: At its core, Strategic Squares is the well-loved Tic-Tac-Toe, known also as noughts and crosses, or Xs and Os. Two players compete to mark three consecutive spaces in a grid, aiming for horizontal, vertical, diagonal, or anti-diagonal alignments to win.
  • Expanded Playfields: Unlike the classic version, players can challenge each other on grids larger than the standard 3x3, escalating the strategic possibilities.
  • Draw Conditions: It's a solved game where optimal play from both contenders results in a draw, emphasizing the need for clever tactics.

Getting Started

  • Player Registration: Initially, the game prompts for the names of Player 1 and Player 2.
  • Game Initiation: Upon entering names, players hit Start to commence the duel. A Rules button is also available, offering a chance to review game mechanics and strategies.
  • Two-Player Dynamics: Strategic Squares is exclusively a two-player experience, fostering competitive yet friendly matchups.

In-Game Mechanics

  • Opening Board: The game kicks off with an empty board, Player 1 making the first move with 'X', followed by Player 2 with 'O'.
  • Gameplay Flexibility: Players can reset the game to its initial state or give up at any point. However, once the game concludes, no resets are allowed.
  • Role Reversal: A Switch Button allows the second player to take the first move, adding an element of surprise and strategy adjustment.

Conclusion of the Game

  • Victory Conditions: A player wins by aligning three marks in a horizontal, vertical, diagonal, or anti-diagonal row. Draws lead to a replay option.
  • Data Recording: Post-game, the system logs the date and time of the match, player names, turn count, and winner's name.
  • Recognition: A High Score Table showcases the top 5 players based on wins and, in case of ties, on the number of moves. This competitive feature encourages ongoing engagement.
  • Data Management: All game records are meticulously stored in a database, utilizing a JSON file for easy access and integrity.

Contributing

I welcome contributions to Strategic Squares: A Twist on Classic Tic-Tac-Toe! If you have suggestions for improving the game or have found a way to beat the current record, please feel free to contribute. Here's how you can do so:

  1. Fork the repository.
  2. Create a new branch (git checkout -b <branch_name>).
  3. Commit your changes (git commit -m 'Added some features...').
  4. Push to the branch (git push origin <branch_name>).
  5. Open a pull request.

Join us in Strategic Squares, where every move counts, and every game writes a new story of strategy, anticipation, and triumph.

About

Tic-Tac-Toe game using Java FXML following MVC Model Architecture

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published