Roulette wheel in Blazor WebAssembly

Download a Roulette wheel, coded in Microsoft's newest web framework, Blazor WebAssembly.

This involves the European roulette wheel and coding the functionality to guess whether the ball will stops on red and black.

The user can guess whether the ball will stop on red or black, and we watch the ball go around the wheel until it stops on a particular colour. The colour of that number will determine whether the user is a winner or not.

This ASP.NET Core example is C# and Razor components. In addition, each number on the Roulette wheel will use a Razor component and C# for coding. For styling, we used CSS isolation, which is a featured adding to Blazor in .NET 5.


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.Roulette.sln in Visual Studio.

Start the project in Visual Studio.

Hit https://localhost:4200, and you can now play Roulette 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.

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

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