{"id":26378274,"url":"https://github.com/abrarabe/tic-tac-toe","last_synced_at":"2026-05-01T12:32:20.672Z","repository":{"id":271708994,"uuid":"910846205","full_name":"AbrarAbe/tic-tac-toe","owner":"AbrarAbe","description":"A simple Tic-tac-toe game made with flutter","archived":false,"fork":false,"pushed_at":"2025-04-04T13:22:49.000Z","size":382,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-06T14:43:19.589Z","etag":null,"topics":["flutter","flutter-game","tic-tac-toe"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AbrarAbe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-01-01T16:02:34.000Z","updated_at":"2025-04-04T13:22:52.000Z","dependencies_parsed_at":"2025-01-09T12:40:59.059Z","dependency_job_id":"fc09cdd2-955c-4ade-9e1c-0d5fab09cccb","html_url":"https://github.com/AbrarAbe/tic-tac-toe","commit_stats":null,"previous_names":["abrarabe/tic-tac-toe"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AbrarAbe/tic-tac-toe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbrarAbe%2Ftic-tac-toe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbrarAbe%2Ftic-tac-toe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbrarAbe%2Ftic-tac-toe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbrarAbe%2Ftic-tac-toe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AbrarAbe","download_url":"https://codeload.github.com/AbrarAbe/tic-tac-toe/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbrarAbe%2Ftic-tac-toe/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32497811,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flutter","flutter-game","tic-tac-toe"],"created_at":"2025-03-17T04:38:21.133Z","updated_at":"2026-05-01T12:32:20.635Z","avatar_url":"https://github.com/AbrarAbe.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tic-Tac-Toe - Flutter\n\nThis project is a simple implementation of the classic game Tic-Tac-Toe, built using Flutter.  It supports both single-player (against a basic AI) and two-player modes.  The app is designed to be responsive and uses Flutter's theming capabilities for easy customization.\n\n## Demo\nhttps://github.com/user-attachments/assets/4480ed19-53d4-4275-8e80-497659c8f6a2\n\n## Features\n\n*   **Two Game Modes:**\n    *   **Single Player:** Play against a computer opponent.  The AI uses a simple strategy:\n        1.  Win if possible.\n        2.  Block the player from winning.\n        3.  Choose a random empty cell.\n    *   **Two Player:**  Play against another person on the same device.\n\n*   **Dynamic Theming:** The app's color scheme responds to changes in the Flutter theme. You can easily customize the look and feel.\n\n*   **Game Logic:**\n    *   Detects wins (horizontal, vertical, and diagonal).\n    *   Detects draws.\n    *   Resets the game after a win or draw.\n    *   Clear visual feedback for the current player and winning moves.\n\n*   **UI:**\n    *   Clean and intuitive user interface.\n    *   Uses `GridView` for a responsive board layout.\n    *   `AlertDialog` for displaying game results (win/draw).\n    *   Custom widgets (`MyBox`, `PlayerBox`, `MyAppBar`, `MyAlertDialog`) for better organization and reusability.\n      \n## Getting Started (for contributors)\n\n### Prerequisites\n\n*   **Flutter SDK:**  You'll need to have the Flutter SDK installed on your machine.  Follow the official Flutter installation guide: [https://docs.flutter.dev/get-started/install](https://docs.flutter.dev/get-started/install)\n*   **Dart SDK:** The Dart SDK is typically installed along with Flutter.\n*   **Emulator or Device:**  You'll need either an Android emulator, iOS simulator, or a physical device connected to your computer to run the app.\n\n### Running the Project\n\n1.  **Clone the Repository:**\n    ```bash\n    git clone https://github.com/AbrarAbe/tic-tac-toe\n    cd tic_tac_toe  # (Replace with the actual directory name)\n    ```\n\n2.  **Get Dependencies:**\n    ```bash\n    flutter pub get\n    ```\n\n3.  **Run the App:**\n    ```bash\n    flutter run\n    ```\n    This command will build and run the app on your connected device or emulator.  If you have multiple devices connected, you might need to specify the target device using the `-d` flag (e.g., `flutter run -d \u003cdevice_id\u003e`).\n\n## Project Structure\n\nThe project is organized as follows:\n\n*   `lib/`: Contains the Dart source code.\n    *   `core/`:  Contains the logic and functions of the game.\n        *   `logic/`:  Contains the game logic implementations.\n        *   `theme/`:  Contains the game logic implementations.\n    *   `features/`:  Contains the main features of the game.\n        *   `screens/`:  Contains the screen implementations.\n        *  `components/`: Reusable widgets.\n    * `main.dart`:  The entry point of the application.\n\n## Dependencies\n\nThis project uses the standard Flutter libraries.  There are no external third-party packages beyond what comes with a basic Flutter project.\n\n*   `flutter/material.dart`: Provides the Material Design widgets.\n\n## AI Notes\n\nThe single-player AI is intentionally basic. It doesn't use advanced algorithms like Minimax. This makes the game beatable for a human player, and keeps the code simpler for learning purposes.  Improving the AI would be a good next step for expanding the project.  Possible improvements:\n\n*   **Minimax Algorithm:** Implement the Minimax algorithm for a more challenging AI.\n*   **Difficulty Levels:**  Allow the user to select different difficulty levels (e.g., Easy, Medium, Hard), perhaps by adjusting the depth of the Minimax search.\n\n## Contributing\n\nContributions are welcome!  If you find any bugs or have suggestions for improvements, feel free to open an issue or submit a pull request.\n\n## License\n\nThis project is open-source and is distributed under the [GPL-3.0 License](LICENSE). See the `LICENSE` file for details.\n\n## Contact\n\n*   [AbrarAbe](\u003chttps://github.com/AbrarAbe\u003e)\n*   \u003cabrar.abe01@gmail.com\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabrarabe%2Ftic-tac-toe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabrarabe%2Ftic-tac-toe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabrarabe%2Ftic-tac-toe/lists"}