Skip to content

Latest commit

 

History

History
57 lines (30 loc) · 2.4 KB

README.md

File metadata and controls

57 lines (30 loc) · 2.4 KB

Tic Tac Toe Game with GUI

Project Description

Developed an engaging and fully responsive Tic Tac Toe game using Java, featuring an interactive game board. The game employs advanced GUI techniques to create a seamless desktop widget, allowing for dynamic and interactive gameplay. It is designed to be directly accessible through the desktop, providing a user-friendly experience.

Features

  1. Interactive Game Board:

    • JPanel: Utilized to create the grid layout for the Tic Tac Toe board.
    • JButton: Each cell of the Tic Tac Toe board is a button, allowing users to make their moves.
    • JLabel: Displays game status messages such as "Player X's Turn", "Player O's Turn", or "Player X Wins!".
  2. Responsive Design:

    • Ensured that the game board resizes and adjusts dynamically based on the window size, providing a consistent user experience across different screen resolutions.
  3. Game Logic:

    • Incorporated the core logic for checking win conditions, draw conditions, and handling player turns.
  4. Desktop Accessibility:

    • The application can be launched directly from the desktop, making it easily accessible for users.
  5. Error Handling:

    • Included robust error handling to manage invalid moves and other potential issues during gameplay.

Technologies Used

  1. Java Programming Language: The core programming language used to develop the application.
  2. Swing Framework:
    • JFrame: Used to create the main application window.
    • JPanel: Utilized for organizing the components within the application window.
    • JButton: Employed for the interactive cells of the Tic Tac Toe board.
    • JLabel: Used to display status messages and instructions to the user.
  3. Event Handling:
    • Implemented ActionListener to handle user interactions with the game board.
  4. Layout Managers:
    • Utilized different layout managers such as GridLayout for arranging the game board and BorderLayout for organizing the main window components.

Screenshot 2024-05-09 223137

Screenshot 2024-05-09 223303

Screenshot 2024-05-09 223336