Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Visual Studio Question

Discussion in 'Code Editors & IDEs' started by Sniperninja564, Nov 24, 2015.

  1. Sniperninja564

    Sniperninja564

    Joined:
    Nov 18, 2015
    Posts:
    4
    Hi I recently wrote this and made a randomized math quiz with Visual Studio in C#
    Code (CSharp):
    1. using System;
    2. using System.Collections.Generic;
    3. using System.Linq;
    4. using System.Text;
    5. using System.Threading.Tasks;
    6.  
    7. namespace Math_Side_Project
    8. {
    9.     class MainClass
    10.     {
    11.         static void Main(string[] args) //This is a method called "Main". It's called when the program starts!
    12.         {
    13.             Random numberGenerator = new Random ();
    14.  
    15.             int num01 = numberGenerator.Next(1,12);
    16.             int num02 = numberGenerator.Next(1,12);
    17.  
    18.             Console.WriteLine("It's Quiz Time!\n");
    19.             Console.WriteLine("What is " + num01 + " times " + num02 + "?");
    20.  
    21.             int answer = Convert.ToInt32(Console.ReadLine());
    22.  
    23.             if (answer == num01 * num02){
    24.                 Console.WriteLine("\nExellent! Your answer is correct.");
    25.             } else {
    26.  
    27.                 int responseIndex = numberGenerator.Next(1, 4);
    28.                 switch (responseIndex) {
    29.  
    30.                 case 1:
    31.                     Console.WriteLine("\nAre you even trying?");
    32.                     break;
    33.                 case 2:
    34.                     Console.WriteLine("\nNice try.");
    35.                     break;
    36.                 case 3:
    37.                     Console.WriteLine("\nYou are sooo close!");
    38.                     break;
    39.                 default:
    40.                     Console.WriteLine("\nYou can do better then that");
    41.                     break;
    42.                 }
    43.             }
    44.            
    45.             Console.ReadKey();
    46.         }
    47.     }
    48. }
    I showed this to my friends and they liked it so I was wondering if I could possibly change the text font or at least make it look neater. Or do I have to use JS or Unity to do that?

    PS: Sorry if this is in the wrong section.
     
  2. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    Umm... this is not Unity specific at all. But what you wrote is a Console app so you're stuck pretty much with the Console font. If you want it to look marginally nicer, you could rewrite it as a Winforms application. If you want it to look a lot nicer and have more design freedom you could write it as a WPF or Windows Store application.