Skip to content

CodeBenderrr/GridLock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฎ Tic Tac Toe - Java Swing GUI

A fully featured Tic Tac Toe game built with Java Swing, allowing two players to play multiple rounds with name, symbol, and theme customization.


Gameplay Screenshot Gameplay Screenshot Gameplay Screenshot Gameplay Screenshot

๐Ÿ–ฅ๏ธ Features

  • ๐ŸŽจ Graphical Interface using Java Swing
  • ๐Ÿ‘ฅ Two-player support with custom name input
  • โœ๏ธ Player symbol selection (X or O)
  • ๐Ÿ” Multiple round system with score tracking
  • ๐Ÿ”„ Ask who starts each round for fairness
  • ๐ŸŒ— Dark Mode / Light Mode toggle
  • โœ… Win & draw detection with color highlights
  • ๐Ÿงฎ Scoreboard tracking:
    • Player wins
    • Draw count
  • โŒ Exit button to close the game
  • โฑ๏ธ Automatic reset between rounds

๐Ÿงฐ Tech Stack

  • Language: Java
  • GUI: Java Swing
  • IDE: Recommended: IntelliJ IDEA, Eclipse, or any Java-supported IDE

๐Ÿš€ How to Run

  1. Clone this repository or copy the code into a .java file (e.g. TicTacToeGUI.java).

  2. Compile and run using your preferred IDE or terminal:

    javac TicTacToeGUI.java
    java TicTacToeGUI
  3. The GUI will launch and prompt you for:

  • Player names
  • Symbol selection (X or O)
  • Number of rounds
  • Who starts first each round

๐Ÿ“ Notes

  • The game ends automatically after the final round.
  • The win condition is visually indicated by green-highlighted winning cells.
  • Dark mode affects the entire interface, including buttons and text.

โœจ Future Enhancements (Suggestions)

  • ๐Ÿ”Š Add sound effects for clicks and win events
  • ๐Ÿค– Implement a single-player mode with AI
  • ๐Ÿ“ Export match history or scores to a file
  • ๐ŸŽจ Add theme customization (colors, fonts)

๐Ÿ™Œ Acknowledgements

Made with โค๏ธ using Java Swing.


๐Ÿ“„ License

This project is licensed under the MIT License โ€“ feel free to use, modify, and distribute.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages