Member-only story
Hellooo, it has been a while since I have written an article (I swear I always say that) and I have been delving more into C# as of recently. So I thought it would be cool to show off basic programs I have been building in my spare time and hopefully people can take something from it :)
First things first. For this project I will use Rider, it is an interesting piece of software that is a C# IDE for Apple Mac users. I believe you can also create C# console applications using Visual Studio Code, however, that is not in the scope of this tutorial.
So in Rider I chose “console application” and once this has finished generating you will see a project that includes a file named “Program.cs”. Within this file there is a “Main” function, within this function create 3 variables. One with a type of “bool” named “gmeLoop” with a default value of true. Also, create 2 int variables one named “userPoints” with a default value of 0 and another named “computerPoints” with a default value of 0.
bool gameLoop = true;
int userPoints = 0;
int computerPoints = 0;
The gameLoop variable will be used within a while loop so the code within the loop will run as long as the variable “gameLoop” is true, else it will exit the loop and the code below it will run.
bool gameLoop = true;
int…