A game of tic-tac-toe (level 24)from the book "The C# Player's Guide 5th Edition" by RB Whitaker.
The game involves a player and the computer. The computer has AI with levels of easy, medium, and hard.
To set up .NET 8, follow these steps:
- Download the .NET 8 SDK from the official Microsoft website: https://dotnet.microsoft.com/en-us/download
- Install the SDK by following the on-screen instructions.
- Verify the installation by opening a command prompt or terminal and running the command
dotnet --version. This should display the installed .NET 8 version.
- Player vs. Computer gameplay
- AI with three difficulty levels: Easy, Medium, and Hard
-
Run the game.
dotnet run --project PlayGame/PlayGame.csproj
-
Select your difficulty level.
-
The game board will be displayed, with numbers 1-9 representing the available moves.
-
Enter the number corresponding to the position where you want to place your mark (X).
-
The computer will make its move (O).
-
The game continues until there is a winner or a draw.