Skip to content

Repository files navigation

Two Player TikTakToe Game in Flutter with Best Move Feature

This is a simple implementation of the classic two player game, TikTakToe, using Flutter with a feature of best move using alpha-beta pruning.

Features

  • Play against a friend in a 3x3 grid.
  • Turn-based gameplay where players take turns placing X or O on the board.
  • Detects when a player has won or the game ends in a tie.
  • Displays the final result.
  • Allows players to restart the game after it ends.
  • Uses alpha-beta pruning to determine the best move for the player.

Screenshots

Gameplay Screenshot Suggestion Screenshot

Winning Screenshot Tie Screenshot

Usage

To play the game, simply clone this repository to your local machine and run it in a Flutter environment. Ensure that you have flutter version 3.3.10 installed and configured on your machine.

Once the app starts running, the will game begins and continues until a player wins or the board is full.

The game will use alpha-beta pruning to determine the best move for the player. The best move will be displayed on the board. You can check the best move by clicking the "Best Move" button.

After the game ends, You can start a new game by clicking the "New Game" button.

One point will be added to the player point when a player wins a game or another player resign by clicking the "Resign" button.

The score of both players can be set to zero by clicking the "Restart" button.

Contributions

Contributions are welcome! If you find a bug or have an idea for a new feature, feel free to create a pull request.

About

This is a simple implementation of the classic two player game, TikTakToe, using Flutter with a feature of best move using alpha-beta pruning.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages