Tic-Tac-Toe game in Blazor WebAssembly

Download the Tic-Tac-Toe game (also known as Noughts & Crosses) coded in Microsoft's newest web framework, Blazor WebAssembly.

Tic-Tac-Toe is where you have 2 players on a 3 x 3 grid. One of the players uses the 'O' mark (or noughts). The other play uses the 'X' mark (or crosses).

Each player takes alternate turns. The aim of the game is to get three in a row with their mark. They can either three in a row horizontally, vertically or diagonally. If no one gets three in a row, the game is drawn.

This ASP.NET Core example is built up using C# and Razor component's. Not only can you play the game with this example, you can also keep track of the score, and reset the game.

Software

This is the software that will need to be installed onto your machine.

Get The Application Working

These are the steps to get the application working.

  • Fill out the source code form. We will send you an email where you can download the source code.

You are now ready to go.

Open the Project in Visual Studio

Open up RoundTheCode.TicTacToe.sln in Visual Studio.

Start the project in Visual Studio.

Hit https://localhost:4000, and you can now play Tic-Tac-Toe in your web browser.

More Information

This example was done as part of a live coding challenge that we did in YouTube.

We had an hour to code the application. Within that hour, we had to design the application, and build up the functionality. We also built a scoreboard for the game.

Have a watch back of our live stream to see how we went about building it.

In-addition, read about how we created Tic-Tac-Toe in Blazor WebAssembly. Find out what approach we took, how we built up the application and see the code snippets used.

Join our Discord server

  • Can't get your ASP.NET Core application to work? Ask for help here!
  • Discussions with other ASP.NET Core developers.
  • General chat with the community.
Join Discord