I made a C# console roulette game. Check it out and give opinions on how to improve or ideas for some other features? It's not finished yet so it has lots of room for improvement. I am very new so take it easy on me.GitHub linkusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace somekinda{class Program{static void Main(string[] args){              Console.ForegroundColor = ConsoleColor.Yellow;                    Random ran = new Random();    var r = new Random();    string[] color = { Red, Black };                     string guess;    int attempts = 0;    int bet;    int money = 500;    while (money != 0)    {        Console.WriteLine(Roulette Roller by Alifyandra\n);        Console.WriteLine(Money:$ + money+                  Attempts: +attempts);        Console.WriteLine(Type in any off the following letters below:);        Console.WriteLine(a.Even    b.Odd    c.1 to 18    d.19 to 36);        Console.WriteLine(e.Red     f.Black  g.1st 12     h.2nd 12);        Console.WriteLine(i.3rd 12);        guess = (Console.ReadLine());        //guess verifier        guess.ToLower();        bool check = guess == a || guess == b || guess == c || guess == d || guess == e || guess == f || guess == g || guess == h || guess == i;                                                             if (check == false)        {            Console.WriteLine(You did not enter the correct input value(even/odd));            Console.ReadKey();            Console.Clear();            continue;        }        else        {        bet:            Console.WriteLine(Enter an amount to bet);            bet=Convert.ToInt32(Console.ReadLine());            //bet verifier            if (bet > money)            {                Console.WriteLine(You dont have enough money!);                Console.WriteLine(Press enter to try again.);                Console.ReadKey();                                          goto bet;            }            else {                money -= bet;                int roll = ran.Next(0, 37);                string ranColor = color[r.Next(color.Length)];                bool even = roll % 2 == 0;                if ((((guess == a) && (even == true))) || (((guess == b) && (even == false)))||((guess == e) && (ranColor == Red)||(guess == f) && (ranColor == Black)))                {                    Console.WriteLine(The roulette rolled:  + ranColor +   + roll);                    Console.WriteLine(You won! +$ + bet * 2 + !);                    Console.WriteLine(<Press enter to continue>);                    money += bet * 2;                    attempts += 1;                    Console.ReadKey();                }                else if ((guess == c) && ((roll > 0) && (roll < 19)))                {                    Console.WriteLine(The roulette rolled:  + ranColor +   + roll);                    Console.WriteLine(You won! +$ + bet * 2 + !);                    Console.WriteLine(<Press enter to continue>);                    money += bet * 2;                    attempts += 1;                    Console.ReadKey();                }                else if ((guess == d) && ((roll > 18) && (roll < 37)))                {                    Console.WriteLine(The roulette rolled:  + ranColor +   + roll);                    Console.WriteLine(You won! +$ + bet * 2 + !);                    Console.WriteLine(<Press enter to continue>);                    money += bet * 2;                    attempts += 1;                    Console.ReadKey();                }                       else if ((guess == g) && (roll > 0 && roll < 13) || (guess == h) && (roll > 12 && roll < 25) || (guess == i) && (roll > 24 && roll < 37))                {                    Console.WriteLine(The roulette rolled:  + ranColor +   + roll);                    Console.WriteLine(You won! +$ + bet * 2 + !);                    Console.WriteLine(<Press enter to continue>);                    money += bet * 3;                    attempts += 1;                    Console.ReadKey();                }                else                {                    Console.WriteLine(The roulette rolled:  + ranColor +   + roll);                    Console.WriteLine(You lost! -$ + bet + !);                    Console.WriteLine(<Press enter to continue>);                    attempts += 1;                    Console.ReadKey();                    if (money == 0)                    {                        Console.WriteLine(You are out of money.);                        Console.WriteLine(<Press enter to continue>);                        Console.ReadKey();                    }                }            }        }        Console.Clear();                    }}}}
C# console roulette game
c#;beginner;random;console;windows
Avoid using goto statements instead put the code that you dont want to be displayed the second time into an if statement that will check if a boolean variable named firstTime for example has value of true if it's true than print the information else just skip it and go ahead. Your code will also throw a lot of exceptions like Formatexception etc since you are not verifying that the input is an int also if the player has more money than 2^31 your program will bug too so use long instead.Your check is a little bit redundant like this bool check = guess == a || guess == b || guess == c || guess == d || guess == e || guess == f || guess == g || guess == h || guess == i; Well you already wrote all the possible guesses so you might want to do something like this :bool[] conditions = {guess == a, guess == b, guess == c....}this allows you to use Array.IndexOf this will make your check looks like this :int check = Array.IndexOf(conditions, true);This will return -1 if no condition was met so use into your advantage before you where checking if(check==false) now you will do if(check==-1) and you will also have the bonus that you already know which specific condition was met because Array.IndexOf obviously returns the index of a specific value.This is also not a good approach         Console.WriteLine(Enter an amount to bet);        bet=Convert.ToInt32(Console.ReadLine());        //bet verifier        if (bet > money)        {            Console.WriteLine(You dont have enough money!);            Console.WriteLine(Press enter to try again.);            Console.ReadKey();                                      goto bet;        }instead put this into a while loop that will break only when the user enter's correct values.    Console.WriteLine(Enter an amount to bet);    bet = Convert.ToInt32(Console.ReadLine());    while (bet > money)    {        Console.WriteLine(You dont have enough money!);        Console.WriteLine(Press enter to try again.);        Console.ReadKey();        Console.WriteLine(Enter an amount to bet);        bet = Convert.ToInt32(Console.ReadLine());    }Now one small problem here is that you say Press Enter to try again however you are not looking for the specific Enter key you accept any keys. If you really want enter to be used do it like this :            Console.WriteLine(Press enter to try again.);            while (!(Console.KeyAvailable && Console.ReadKey(true).Key == ConsoleKey.Enter))            {            }One major problem are the long if statements that include magic numbers as well. Simple fix would be to refactor them into functions with respective names they are really long really hard to read and follow what's going on. Declare the magic number as constant's that's really important. You are also repeating the same text over and over again.                Console.WriteLine(The roulette rolled:  + ranColor +   + roll);                Console.WriteLine(You lost! -$ + bet + !);                Console.WriteLine(<Press enter to continue>);Instead first refactor the if statements into boolean functions than refactor the entire if into 1 method that way your code will become really clearer and much better. You wont even need to check if(guess == some string) instead make the check a private static int declared outside of the static void Main() this way you can access it in your method without passing it as parameter. Even a better approach would be to create a static class with an enum that will work together. Also make the enter check into a method and like this :    private static bool IsEnterPressed()    {        while (!(Console.KeyAvailable && Console.ReadKey(true).Key == ConsoleKey.Enter))        {        }        return true;    }and use it everywhere you ask for the Enter key to be pressed             if (IsEnterPressed())            {                Console.WriteLine(Enter an amount to bet);                bet = Convert.ToInt32(Console.ReadLine());            }How to verify the input is not a string :        long bet;        string tempInput = Console.ReadLine();        while (!long.TryParse(tempInput, out bet))        {            Console.WriteLine(You didn't enter correct input !);            Console.Write(Enter amount to bet : );            tempInput = Console.ReadLine();        }One last thing you have 2 Random variables. You need just one you do int a = rand.Next(x,y) anyway you can do it with just 1 variable.