An open API service indexing awesome lists of open source software.

https://github.com/souhailkrs/flutter-tic-tac-toe

Welcome to the Flutter Tic Tac Toe repository! Play the classic game on your mobile device with sleek design and two-player mode. Perfect for learning Flutter or having fun with friends.
https://github.com/souhailkrs/flutter-tic-tac-toe

dart flutter hive riverpod tic-tac-toe

Last synced: 2 months ago
JSON representation

Welcome to the Flutter Tic Tac Toe repository! Play the classic game on your mobile device with sleek design and two-player mode. Perfect for learning Flutter or having fun with friends.

Awesome Lists containing this project

README

          

Tic Tac Toe


## Introduction

The classic Tic Tac Toe game built using Flutter. To enhance the user experience, I implemented Hive
as the local database, allowing players to view their games later. Additionally, I utilized hooks, a
flutter implementation of React hooks, and Riverpod to efficiently manage the life-cycle of the
Widget and state managment.
## Features

* **Single Player** : Challenge yourself against an AI powered by the ****MiniMax**** algorithm, known for its strategic decision-making in game theory. Experience an engaging gameplay where the AI selects optimal moves, making every match a test of your skills.

* **Multiplayer** : Compete against friends, customize player names, and choose "X" or "O" to determine
the Tic Tac Toe champion!
* **History** : Easily access and review your past matches, stored locally using Hive.

## State Management

This project utilizes Hooks and Riverpod for efficient state management:

* [**Hooks**](https://pub.dev/packages/flutter_hooks)

Inspired by their React counterparts, Hooks offer a functional and reusable approach to constructing components, improving upon the usage of StatefulWidget. For instance, when using text field controllers, you have to manually dispose of them to prevent memory leaks, whereas hooks handle this automatically (useTextEditingController).
* [**Riverpod**](https://pub.dev/packages/riverpod)

Riverpod, a state management library, distinguishes itself through its emphasis on simplicity,
performance, and scalability. This library seamlessly integrates into Flutter's ecosystem and
furnishes an accessible interface. Employing Riverpod, I've adeptly overseen the application's
state, simplifying the management of intricate interplays among distinct components.

Combining Hooks and Riverpod has enabled me to create a cleaner and more efficient architecture for
the Tic Tac Toe game, resulting in improved performance and maintainability.



      

      

      




      

      

## Build Process

- Follow the [Flutter Guide](https://docs.flutter.dev/) for getting started building a flutter
project.
- Clone or download the repo

```{r klippy, echo=FALSE, include=TRUE}
git clone https://github.com/SouhailKrs/Flutter-Tic-Tac-Toe
```

- Get dependencies

```{r klippy, echo=FALSE, include=TRUE}
flutter pub get
```