Skip to content

Welcome to the TicTacToe Blazor Web Assembly project with an AI opponent! This is a simple implementation of the classic Tic-Tac-Toe game using Blazor Web Assembly. In this version, you'll be challenging an AI opponent in the timeless battle of X's and O's.

License

Notifications You must be signed in to change notification settings

mhdbouk/tictactoe-blazor

Repository files navigation

TicTacToe Blazor Web Assembly with MAUI Support

TicTacToe Preview TicTacToe Preview 1 TicTacToe Preview 2

Welcome to the TicTacToe Blazor Web Assembly project with an AI opponent! This is a simple implementation of the classic Tic-Tac-Toe game using Blazor Web Assembly, now with MAUI Blazor support. In this version, you'll be challenging an AI opponent in the timeless battle of X's and O's on both desktop and mobile.

Table of Contents

Demo

You can try out the live demo of the TicTacToe game here.

Features

  • Work on Browser, Mobile, and Native Desktop app using MAUI.
  • Play against an AI opponent.
  • Interactive game board.
  • Real-time feedback on game status.
  • Multiplayer (Co-op)
  • Online Multiplayer WIP

Blog Posts

For a detailed explanation of how this project was built, check out our blog posts Let's Build a Tic Tac Toe Game with Blazor WebAssembly! and Bringing Blazor to Desktop and Mobile with MAUI

Getting Started

To get started with this TicTacToe Blazor Web Assembly project locally, follow these steps:

  1. Clone the repository:

    git clone https://github.com/mhdbouk/tictactoe-blazor.git
    cd tictactoe-blazor
  2. Build and run the project:

    Make sure you have the .NET 7 SDK installed.

    dotnet build
    dotnet run
  3. Open in your browser:

    Open your preferred web browser and navigate to https://localhost:7205.

Usage

  • Select the playing mode (AI, 2 Players, Online)
  • When selecting AI, you play as "X" and the AI opponent plays as "O".
  • Click on the empty cells of the game board to place your move.
  • The AI opponent will make its move automatically.
  • The game will automatically detect a win, loss, or draw and display the result.
  • To start a new game, click on the Restart button.

Contributing

Contributions are welcome! If you'd like to contribute to this project, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Make your changes and commit them with descriptive commit messages.
  4. Push your changes to your fork.
  5. Create a pull request to the main branch of this repository.

License

This project is licensed under the MIT License.

About

Welcome to the TicTacToe Blazor Web Assembly project with an AI opponent! This is a simple implementation of the classic Tic-Tac-Toe game using Blazor Web Assembly. In this version, you'll be challenging an AI opponent in the timeless battle of X's and O's.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published