Creating the “guess the number” project
In this section, we will build a simple number-guessing game. The game will allow for multiple guesses and will alert us when we win.
This is a screenshot of the completed application:
Figure 3.19: Guess the Number game
The build time for this project is approximately 60 minutes.
Project overview
The GuessTheNumber
project will be created by using Microsoft’s Blazor WebAssembly App Empty project template to create an empty Blazor WebAssembly project. First, we will add the components needed for the project. Then, we will add logging. We will debug the app in both Visual Studio and the browser. We will add an ErrorBoundary
component. Finally, we will deploy the project to Microsoft Azure.
Getting started with the project
We need to create a new Blazor WebAssembly app. We do this as follows:
- Open Visual Studio 2022.
- Click the Create a new project button.
- Press Alt+S to...